From 2004059a170ad9b12b79a598e859eb6025336870 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 9 Aug 2023 00:58:44 -0400 Subject: [PATCH] Reduce the amount of code generated for MTRClusters. (#28594) 1. Push endpoint property up to MTRCluster, instead of having it be on every MTRCluster* and MTRBaseCluster* instance. 2. Instead of duplicating all the command bridge code for MTRCluster* commands, just instantiate the relevant MTRBaseCluster and delegate to it. --- src/darwin/Framework/CHIP/MTRCluster.mm | 5 +- .../Framework/CHIP/MTRCluster_Internal.h | 5 +- .../CHIP/templates/MTRBaseClusters-src.zapt | 13 +- .../templates/MTRBaseClusters_Internal.zapt | 1 - .../CHIP/templates/MTRClusters-src.zapt | 105 +- .../CHIP/templates/MTRClusters_Internal.zapt | 1 - .../CHIP/zap-generated/MTRBaseClusters.mm | 7315 ++++--- .../zap-generated/MTRBaseClusters_Internal.h | 93 - .../CHIP/zap-generated/MTRClusters.mm | 17298 +++++----------- .../CHIP/zap-generated/MTRClusters_Internal.h | 93 - 10 files changed, 8410 insertions(+), 16519 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index eab05409e23af0..dae2acc9d57f62 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -23,9 +23,12 @@ using namespace ::chip; @implementation MTRCluster -- (instancetype)initWithQueue:(dispatch_queue_t)queue +- (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue; { if (self = [super init]) { + // TODO consider range-checking the incoming number to make sure it's + // actually in the EndpointId range + _endpoint = endpointID.unsignedShortValue; _callbackQueue = queue; } return self; diff --git a/src/darwin/Framework/CHIP/MTRCluster_Internal.h b/src/darwin/Framework/CHIP/MTRCluster_Internal.h index 077628fd118a09..f3fd0f2722e323 100644 --- a/src/darwin/Framework/CHIP/MTRCluster_Internal.h +++ b/src/darwin/Framework/CHIP/MTRCluster_Internal.h @@ -24,12 +24,15 @@ #import "zap-generated/MTRBaseClusters.h" #include +#include NS_ASSUME_NONNULL_BEGIN @interface MTRCluster () @property (readonly, nonatomic) dispatch_queue_t callbackQueue; -- (instancetype _Nullable)initWithQueue:(dispatch_queue_t)queue; +@property (nonatomic, readonly) chip::EndpointId endpoint; + +- (instancetype)initWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue; - (chip::ByteSpan)asByteSpan:(NSData *)value; - (chip::CharSpan)asCharSpan:(NSString *)value; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index c88866ee76358a..bd903274e66fbf 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -34,15 +34,12 @@ using chip::System::Clock::Seconds16; - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -122,7 +119,7 @@ MTR{{cluster}}Cluster{{command}}Params {{/last}} {{/zcl_command_arguments}} - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); } @@ -156,7 +153,7 @@ MTR{{cluster}}Cluster{{command}}Params 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()); + TypeInfo::DecodableType>(params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } {{#if isWritableAttribute}} @@ -196,7 +193,7 @@ MTR{{cluster}}Cluster{{command}}Params TypeInfo::Type cppValue; {{>encode_value target="cppValue" source="value" cluster=parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -209,7 +206,7 @@ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptio reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler { 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()); + 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}}WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer 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_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt index 73ac0c844c96e7..9d40126f3a857d 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters_Internal.zapt @@ -10,7 +10,6 @@ {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} @interface MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 0790729ce756e5..6ae259be2877e2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -1,6 +1,7 @@ {{> header excludeZapComment=true}} #import +#import #import "MTRAsyncCallbackWorkQueue.h" #import "MTRBaseClusterUtils.h" @@ -49,14 +50,11 @@ static void MTRClustersLogCompletion(NSString *logPrefix, id value, NSError *err - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - {{!TODO consider range-checking the incoming number to make sure it's - actually in the uint16_t range}} - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -90,6 +88,20 @@ MTRClusterIDType{{cluster}}ID MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{/unless}} {{/inline}} +{{#*inline "baseCluster"}} +{{#if (isSupported cluster command=command)}} +MTRBaseCluster{{cluster}} +{{else}} +MTRBaseCluster{{compatClusterNameRemapping parent.name}} +{{/if}} +{{/inline}} +{{#*inline "completionName"}} +{{#if (isSupported cluster command=command)}} +completion +{{else}} +completionHandler +{{/if}} +{{/inline}} {{#unless hasArguments}} - (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { @@ -98,73 +110,38 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{/unless}} - (void){{asLowerCamelCase name}}WithParams: ({{> paramsType}} * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { - NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, (unsigned int){{> clusterId}}, (unsigned int){{> commandId}}]; + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int){{> clusterId}}, (unsigned int){{> commandId}}]; // Make a copy of params before we go async. params = [params copy]; - NSNumber *timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice *baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - auto * bridge = new MTR{{>callbackName}}CallbackBridge(self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[{{> baseCluster}} alloc] initWithDevice:baseDevice endpointID:@(self.endpoint) queue:self.device.queue]; + [cluster {{asLowerCamelCase name}}WithParams:params {{> completionName}}: + {{#if hasSpecificResponse}} + ^(MTR{{cluster}}Cluster{{asUpperCamelCase responseName preserveAcronyms=true}}Params * _Nullable value, NSError * _Nullable error) { MTRClustersLogCompletion(logPrefix, value, error); dispatch_async(self.callbackQueue, ^{ - {{#if hasSpecificResponse}} - {{! This treats completion as taking an id for the data. This is - not great from a type-safety perspective, of course. }} - completion(value, error); - {{else}} - {{! For now, don't change the bridge API; instead just use an adapter - to invoke our completion handler. This is not great from a - type-safety perspective, of course. }} - completion(error); - {{/if}} + {{! This treats completion as taking an id for the data. This is + not great from a type-safety perspective, of course. }} + completion(value, error); }); [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, {{>callbackName}}CallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_castcallbackName}}CallbackBridge *>(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - {{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - {{#if mustUseTimedInvoke}} - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - {{/if}} - {{#zcl_command_arguments}} - {{#first}} - {{#unless parent.commandHasRequiredField}} - if (params != nil) { - {{/unless}} - {{/first}} - {{>encode_value target=(concat "request." (asLowerCamelCase label)) source=(concat "params." (asStructPropertyName label)) cluster=parent.parent.name errorCode="return CHIP_ERROR_INVALID_ARGUMENT;" depth=0}} - {{#last}} - {{#unless parent.commandHasRequiredField}} - } - {{/unless}} - {{/last}} - {{/zcl_command_arguments}} - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + } + {{else}} + ^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + {{! For now, don't change the bridge API; instead just use an adapter + to invoke our completion handler. This is not great from a + type-safety perspective, of course. }} + completion(error); + }); + [workItem endWork]; + } + {{/if}} + ]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -198,7 +175,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} {{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} - (NSDictionary *)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) params:params]; } {{#if isWritableAttribute}} @@ -216,7 +193,7 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID } {{/if}} - [self.device writeAttributeWithEndpointID:@(_endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDType{{>cluster}}ID) attributeID:@(MTRAttributeIDTypeCluster{{>cluster}}{{>attribute}}ID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt index 8af0b89a300cf1..a8d80d094743d2 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters_Internal.zapt @@ -10,7 +10,6 @@ {{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} @interface MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice *device; @end {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 4123b1d90123c2..5e6aa53256bb6f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -47,13 +47,12 @@ @implementation MTRBaseClusterIdentify - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -88,7 +87,7 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion } request.identifyTime = params.identifyTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127,7 +126,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params request.effectVariant = static_cast>(params.effectVariant.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -138,7 +137,7 @@ - (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -172,7 +171,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -184,7 +183,7 @@ - (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -218,7 +217,7 @@ - (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -227,7 +226,7 @@ - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -261,7 +260,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -271,7 +270,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -306,7 +305,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -316,7 +315,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -351,7 +350,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -360,7 +359,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Identify::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -394,7 +393,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -403,7 +402,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -437,7 +436,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -446,7 +445,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -480,7 +479,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -489,7 +488,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -859,13 +858,12 @@ @implementation MTRBaseClusterGroups - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -898,7 +896,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -932,7 +930,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -988,7 +986,7 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1022,7 +1020,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1062,7 +1060,7 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1100,7 +1098,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa request.groupID = params.groupID.unsignedShortValue; request.groupName = [self asCharSpan:params.groupName]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1111,7 +1109,7 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1120,7 +1118,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1154,7 +1152,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1164,7 +1162,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1199,7 +1197,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1209,7 +1207,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1244,7 +1242,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Groups::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1253,7 +1251,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Groups::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1287,7 +1285,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1296,7 +1294,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1330,7 +1328,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1339,7 +1337,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1373,7 +1371,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -1382,7 +1380,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -1745,13 +1743,12 @@ @implementation MTRBaseClusterScenes - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -1833,7 +1830,7 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1868,7 +1865,7 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1903,7 +1900,7 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1938,7 +1935,7 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -1973,7 +1970,7 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2019,7 +2016,7 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2054,7 +2051,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * } request.groupID = params.groupID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2139,7 +2136,7 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2175,7 +2172,7 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p request.groupID = params.groupID.unsignedShortValue; request.sceneID = params.sceneID.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2213,7 +2210,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params request.groupIdentifierTo = params.groupIdentifierTo.unsignedShortValue; request.sceneIdentifierTo = params.sceneIdentifierTo.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -2224,7 +2221,7 @@ - (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2233,7 +2230,7 @@ - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2267,7 +2264,7 @@ - (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2276,7 +2273,7 @@ - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2310,7 +2307,7 @@ - (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2319,7 +2316,7 @@ - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2353,7 +2350,7 @@ - (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2362,7 +2359,7 @@ - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2396,7 +2393,7 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2405,7 +2402,7 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2439,7 +2436,7 @@ - (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2448,7 +2445,7 @@ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2483,7 +2480,7 @@ - (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2492,7 +2489,7 @@ - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2526,7 +2523,7 @@ - (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2535,7 +2532,7 @@ - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2570,7 +2567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2580,7 +2577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2615,7 +2612,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2625,7 +2622,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2660,7 +2657,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Scenes::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2669,7 +2666,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Scenes::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2703,7 +2700,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2712,7 +2709,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2746,7 +2743,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2755,7 +2752,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -2789,7 +2786,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -2798,7 +2795,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3416,13 +3413,12 @@ @implementation MTRBaseClusterOnOff - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -3460,7 +3456,7 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(M } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3499,7 +3495,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTR } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3538,7 +3534,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params complet } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3576,7 +3572,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params com params.effectIdentifier.unsignedCharValue); request.effectVariant = params.effectVariant.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3616,7 +3612,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3655,7 +3651,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c request.onTime = params.onTime.unsignedShortValue; request.offWaitTime = params.offWaitTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3666,7 +3662,7 @@ - (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params @@ -3675,7 +3671,7 @@ - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3709,7 +3705,7 @@ - (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params @@ -3719,7 +3715,7 @@ - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _No { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3754,7 +3750,7 @@ - (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3788,7 +3784,7 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3800,7 +3796,7 @@ - (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3834,7 +3830,7 @@ - (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -3868,7 +3864,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3880,7 +3876,7 @@ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3914,7 +3910,7 @@ - (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -3953,7 +3949,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -3965,7 +3961,7 @@ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -3999,7 +3995,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4009,7 +4005,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4044,7 +4040,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4054,7 +4050,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4089,7 +4085,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOff::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4098,7 +4094,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OnOff::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4132,7 +4128,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4141,7 +4137,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4175,7 +4171,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4184,7 +4180,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4218,7 +4214,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4227,7 +4223,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4778,13 +4774,12 @@ @implementation MTRBaseClusterOnOffSwitchConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -4794,7 +4789,7 @@ - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4803,7 +4798,7 @@ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4837,7 +4832,7 @@ - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -4871,7 +4866,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -4883,7 +4878,7 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4918,7 +4913,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4928,7 +4923,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -4964,7 +4959,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -4974,7 +4969,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5009,7 +5004,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5018,7 +5013,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5052,7 +5047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5061,7 +5056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5095,7 +5090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5104,7 +5099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5138,7 +5133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5147,7 +5142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5507,13 +5502,12 @@ @implementation MTRBaseClusterLevelControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -5558,7 +5552,7 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5604,7 +5598,7 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5651,7 +5645,7 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5690,7 +5684,7 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MT request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5737,7 +5731,7 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5783,7 +5777,7 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5830,7 +5824,7 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5869,7 +5863,7 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par request.optionsOverride = static_cast>(params.optionsOverride.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5906,7 +5900,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre } request.frequency = params.frequency.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -5917,7 +5911,7 @@ - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5926,7 +5920,7 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -5960,7 +5954,7 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -5969,7 +5963,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6003,7 +5997,7 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6012,7 +6006,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6046,7 +6040,7 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6055,7 +6049,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6089,7 +6083,7 @@ - (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6098,7 +6092,7 @@ - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6133,7 +6127,7 @@ - (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6142,7 +6136,7 @@ - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6176,7 +6170,7 @@ - (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6185,7 +6179,7 @@ - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6219,7 +6213,7 @@ - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6253,7 +6247,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6265,7 +6259,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = LevelControl::Attributes::Options::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6299,7 +6293,7 @@ - (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6333,7 +6327,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6346,7 +6340,7 @@ - (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6381,7 +6375,7 @@ - (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6420,7 +6414,7 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6432,7 +6426,7 @@ - (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6466,7 +6460,7 @@ - (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6505,7 +6499,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6517,7 +6511,7 @@ - (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6552,7 +6546,7 @@ - (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6591,7 +6585,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6603,7 +6597,7 @@ - (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6638,7 +6632,7 @@ - (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6677,7 +6671,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6689,7 +6683,7 @@ - (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6724,7 +6718,7 @@ - (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -6763,7 +6757,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -6776,7 +6770,7 @@ - (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6811,7 +6805,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6821,7 +6815,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6856,7 +6850,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6866,7 +6860,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6901,7 +6895,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6910,7 +6904,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6944,7 +6938,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6953,7 +6947,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -6987,7 +6981,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -6996,7 +6990,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -7030,7 +7024,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -7039,7 +7033,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8025,13 +8019,12 @@ @implementation MTRBaseClusterBinaryInputBasic - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -8041,7 +8034,7 @@ - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8075,7 +8068,7 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8087,7 +8080,7 @@ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8121,7 +8114,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8155,7 +8148,7 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8167,7 +8160,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8201,7 +8194,7 @@ - (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8235,7 +8228,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8247,7 +8240,7 @@ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8281,7 +8274,7 @@ - (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8315,7 +8308,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8327,7 +8320,7 @@ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8361,7 +8354,7 @@ - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8370,7 +8363,7 @@ - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8404,7 +8397,7 @@ - (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8438,7 +8431,7 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8450,7 +8443,7 @@ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8484,7 +8477,7 @@ - (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -8518,7 +8511,7 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -8530,7 +8523,7 @@ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8564,7 +8557,7 @@ - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8573,7 +8566,7 @@ - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8607,7 +8600,7 @@ - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8616,7 +8609,7 @@ - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8651,7 +8644,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8661,7 +8654,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8696,7 +8689,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8706,7 +8699,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8741,7 +8734,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8750,7 +8743,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8784,7 +8777,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8793,7 +8786,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8827,7 +8820,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8836,7 +8829,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -8870,7 +8863,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -8879,7 +8872,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9589,13 +9582,12 @@ @implementation MTRBaseClusterPulseWidthModulation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -9606,7 +9598,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9616,7 +9608,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9652,7 +9644,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9662,7 +9654,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9697,7 +9689,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9706,7 +9698,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9740,7 +9732,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9749,7 +9741,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9783,7 +9775,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9792,7 +9784,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9826,7 +9818,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9835,7 +9827,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9871,13 +9863,12 @@ @implementation MTRBaseClusterDescriptor - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -9887,7 +9878,7 @@ - (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9896,7 +9887,7 @@ - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9930,7 +9921,7 @@ - (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9939,7 +9930,7 @@ - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -9973,7 +9964,7 @@ - (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -9982,7 +9973,7 @@ - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10016,7 +10007,7 @@ - (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10025,7 +10016,7 @@ - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10059,7 +10050,7 @@ - (void)readAttributeTagListWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10068,7 +10059,7 @@ - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10102,7 +10093,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10112,7 +10103,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10147,7 +10138,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10157,7 +10148,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10192,7 +10183,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10201,7 +10192,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10235,7 +10226,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10244,7 +10235,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10278,7 +10269,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10287,7 +10278,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10321,7 +10312,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10330,7 +10321,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10762,13 +10753,12 @@ @implementation MTRBaseClusterBinding - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -10779,7 +10769,7 @@ - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = Binding::Attributes::Binding::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -10850,7 +10840,7 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -10862,7 +10852,7 @@ - (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = Binding::Attributes::Binding::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10896,7 +10886,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10906,7 +10896,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10941,7 +10931,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10951,7 +10941,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -10986,7 +10976,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Binding::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -10995,7 +10985,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Binding::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11029,7 +11019,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11038,7 +11028,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11072,7 +11062,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11081,7 +11071,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11115,7 +11105,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11124,7 +11114,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11441,13 +11431,12 @@ @implementation MTRBaseClusterAccessControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -11458,7 +11447,7 @@ - (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -11592,7 +11581,7 @@ - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -11604,7 +11593,7 @@ - (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11639,7 +11628,7 @@ - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -11695,7 +11684,7 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -11707,7 +11696,7 @@ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11742,7 +11731,7 @@ - (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11753,7 +11742,7 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeP { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11789,7 +11778,7 @@ - (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11800,7 +11789,7 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribePa { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11836,7 +11825,7 @@ - (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11847,7 +11836,7 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeP { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11882,7 +11871,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11892,7 +11881,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11927,7 +11916,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11937,7 +11926,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -11972,7 +11961,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -11981,7 +11970,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12015,7 +12004,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12024,7 +12013,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12058,7 +12047,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12067,7 +12056,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12101,7 +12090,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -12110,7 +12099,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -12615,13 +12604,12 @@ @implementation MTRBaseClusterActions - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -12660,7 +12648,7 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12702,7 +12690,7 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit } request.transitionTime = params.transitionTime.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12742,7 +12730,7 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12784,7 +12772,7 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12824,7 +12812,7 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params complet definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12864,7 +12852,7 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params compl definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12906,7 +12894,7 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12946,7 +12934,7 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -12986,7 +12974,7 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params com definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13028,7 +13016,7 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13068,7 +13056,7 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params c definedValue_0 = params.invokeID.unsignedIntValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13110,7 +13098,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD } request.duration = params.duration.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13121,7 +13109,7 @@ - (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13130,7 +13118,7 @@ - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Actions::Attributes::ActionList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13164,7 +13152,7 @@ - (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13173,7 +13161,7 @@ - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13207,7 +13195,7 @@ - (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13216,7 +13204,7 @@ - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13250,7 +13238,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13260,7 +13248,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13295,7 +13283,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13305,7 +13293,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13340,7 +13328,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Actions::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13349,7 +13337,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Actions::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13383,7 +13371,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13392,7 +13380,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13426,7 +13414,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13435,7 +13423,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13469,7 +13457,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13478,7 +13466,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -13927,13 +13915,12 @@ @implementation MTRBaseClusterBasicInformation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -13972,7 +13959,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -13983,7 +13970,7 @@ - (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -13992,7 +13979,7 @@ - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14027,7 +14014,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14036,7 +14023,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14070,7 +14057,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14079,7 +14066,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14113,7 +14100,7 @@ - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14122,7 +14109,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14156,7 +14143,7 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14165,7 +14152,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14199,7 +14186,7 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14233,7 +14220,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14245,7 +14232,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14279,7 +14266,7 @@ - (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14313,7 +14300,7 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14325,7 +14312,7 @@ - (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14359,7 +14346,7 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14368,7 +14355,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14403,7 +14390,7 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14413,7 +14400,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14448,7 +14435,7 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14457,7 +14444,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14492,7 +14479,7 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14502,7 +14489,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14537,7 +14524,7 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14546,7 +14533,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14581,7 +14568,7 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14590,7 +14577,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14624,7 +14611,7 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14633,7 +14620,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14667,7 +14654,7 @@ - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14676,7 +14663,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14710,7 +14697,7 @@ - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14719,7 +14706,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14753,7 +14740,7 @@ - (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -14787,7 +14774,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -14800,7 +14787,7 @@ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _N { using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14835,7 +14822,7 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14844,7 +14831,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14878,7 +14865,7 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14887,7 +14874,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -14923,7 +14910,7 @@ - (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicInformatio using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14934,7 +14921,7 @@ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -14971,7 +14958,7 @@ - (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformati using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -14982,7 +14969,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -15017,7 +15004,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15027,7 +15014,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15062,7 +15049,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15072,7 +15059,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15107,7 +15094,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15116,7 +15103,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15150,7 +15137,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15159,7 +15146,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15193,7 +15180,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15202,7 +15189,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -15236,7 +15223,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -15245,7 +15232,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16422,13 +16409,12 @@ @implementation MTRBaseClusterOTASoftwareUpdateProvider - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -16503,7 +16489,7 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam definedValue_0 = [self asByteSpan:params.metadataForProvider]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16539,7 +16525,7 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp request.updateToken = [self asByteSpan:params.updateToken]; request.newVersion = params.newVersion.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16577,7 +16563,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify request.updateToken = [self asByteSpan:params.updateToken]; request.softwareVersion = params.softwareVersion.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -16589,7 +16575,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16599,7 +16585,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16635,7 +16621,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16645,7 +16631,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16680,7 +16666,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16689,7 +16675,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16723,7 +16709,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16732,7 +16718,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16766,7 +16752,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16775,7 +16761,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -16809,7 +16795,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -16818,7 +16804,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17114,13 +17100,12 @@ @implementation MTRBaseClusterOTASoftwareUpdateRequestor - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -17164,7 +17149,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou } request.endpoint = params.endpoint.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -17177,7 +17162,7 @@ - (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)pa using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -17234,7 +17219,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -17247,7 +17232,7 @@ - (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17282,7 +17267,7 @@ - (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17291,7 +17276,7 @@ - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17326,7 +17311,7 @@ - (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17335,7 +17320,7 @@ - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17369,7 +17354,7 @@ - (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17379,7 +17364,7 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17415,7 +17400,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17425,7 +17410,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17461,7 +17446,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17471,7 +17456,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17506,7 +17491,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17515,7 +17500,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17550,7 +17535,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17559,7 +17544,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17593,7 +17578,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17602,7 +17587,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -17636,7 +17621,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -17645,7 +17630,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18107,13 +18092,12 @@ @implementation MTRBaseClusterLocalizationConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -18123,7 +18107,7 @@ - (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18157,7 +18141,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18169,7 +18153,7 @@ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18204,7 +18188,7 @@ - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullabl using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18213,7 +18197,7 @@ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18249,7 +18233,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18259,7 +18243,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18295,7 +18279,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18305,7 +18289,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18340,7 +18324,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18349,7 +18333,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18383,7 +18367,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18392,7 +18376,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18426,7 +18410,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18435,7 +18419,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18469,7 +18453,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -18478,7 +18462,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18839,13 +18823,12 @@ @implementation MTRBaseClusterTimeFormatLocalization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -18856,7 +18839,7 @@ - (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18890,7 +18873,7 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18902,7 +18885,7 @@ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -18937,7 +18920,7 @@ - (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Null using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -18971,7 +18954,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -18984,7 +18967,7 @@ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19020,7 +19003,7 @@ - (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _N using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19030,7 +19013,7 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * { using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19066,7 +19049,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19076,7 +19059,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19112,7 +19095,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19122,7 +19105,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19157,7 +19140,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19166,7 +19149,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19200,7 +19183,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19209,7 +19192,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19243,7 +19226,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19252,7 +19235,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19286,7 +19269,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19295,7 +19278,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19712,13 +19695,12 @@ @implementation MTRBaseClusterUnitLocalization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -19728,7 +19710,7 @@ - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -19762,7 +19744,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -19774,7 +19756,7 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19809,7 +19791,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19819,7 +19801,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19854,7 +19836,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19864,7 +19846,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19899,7 +19881,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19908,7 +19890,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19942,7 +19924,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19951,7 +19933,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -19985,7 +19967,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -19994,7 +19976,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20028,7 +20010,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20037,7 +20019,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20355,13 +20337,12 @@ @implementation MTRBaseClusterPowerSourceConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -20371,7 +20352,7 @@ - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20380,7 +20361,7 @@ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20415,7 +20396,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20425,7 +20406,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20461,7 +20442,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20471,7 +20452,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20506,7 +20487,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20515,7 +20496,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20549,7 +20530,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20558,7 +20539,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20592,7 +20573,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20601,7 +20582,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20635,7 +20616,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20644,7 +20625,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -20949,13 +20930,12 @@ @implementation MTRBaseClusterPowerSource - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -20965,7 +20945,7 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -20974,7 +20954,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PowerSource::Attributes::Status::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21008,7 +20988,7 @@ - (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21017,7 +20997,7 @@ - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PowerSource::Attributes::Order::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21051,7 +21031,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21060,7 +21040,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21095,7 +21075,7 @@ - (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21105,7 +21085,7 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParam { using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21141,7 +21121,7 @@ - (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21151,7 +21131,7 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribePar { using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21186,7 +21166,7 @@ - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21195,7 +21175,7 @@ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21230,7 +21210,7 @@ - (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21240,7 +21220,7 @@ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21275,7 +21255,7 @@ - (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21285,7 +21265,7 @@ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21320,7 +21300,7 @@ - (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21330,7 +21310,7 @@ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21365,7 +21345,7 @@ - (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21374,7 +21354,7 @@ - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21408,7 +21388,7 @@ - (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21417,7 +21397,7 @@ - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21452,7 +21432,7 @@ - (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21461,7 +21441,7 @@ - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21495,7 +21475,7 @@ - (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21505,7 +21485,7 @@ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21540,7 +21520,7 @@ - (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21549,7 +21529,7 @@ - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21584,7 +21564,7 @@ - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21593,7 +21573,7 @@ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21627,7 +21607,7 @@ - (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21637,7 +21617,7 @@ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21672,7 +21652,7 @@ - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21681,7 +21661,7 @@ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21716,7 +21696,7 @@ - (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21725,7 +21705,7 @@ - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21759,7 +21739,7 @@ - (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21768,7 +21748,7 @@ - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21803,7 +21783,7 @@ - (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21813,7 +21793,7 @@ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParam { using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21849,7 +21829,7 @@ - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21859,7 +21839,7 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21894,7 +21874,7 @@ - (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21904,7 +21884,7 @@ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _No { using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21939,7 +21919,7 @@ - (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21948,7 +21928,7 @@ - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -21984,7 +21964,7 @@ - (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params @@ -21994,7 +21974,7 @@ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22029,7 +22009,7 @@ - (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22038,7 +22018,7 @@ - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22072,7 +22052,7 @@ - (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22081,7 +22061,7 @@ - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22115,7 +22095,7 @@ - (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22124,7 +22104,7 @@ - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22158,7 +22138,7 @@ - (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22168,7 +22148,7 @@ - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22204,7 +22184,7 @@ - (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22214,7 +22194,7 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribePara { using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22249,7 +22229,7 @@ - (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22259,7 +22239,7 @@ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _No { using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22294,7 +22274,7 @@ - (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22304,7 +22284,7 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * { using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22339,7 +22319,7 @@ - (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22348,7 +22328,7 @@ - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22382,7 +22362,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22392,7 +22372,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22427,7 +22407,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22437,7 +22417,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22472,7 +22452,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22481,7 +22461,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22515,7 +22495,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22524,7 +22504,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22558,7 +22538,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22567,7 +22547,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -22601,7 +22581,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -22610,7 +22590,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24241,13 +24221,12 @@ @implementation MTRBaseClusterGeneralCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -24282,7 +24261,7 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24320,7 +24299,7 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato request.countryCode = [self asCharSpan:params.countryCode]; request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24361,7 +24340,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24372,7 +24351,7 @@ - (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -24406,7 +24385,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -24418,7 +24397,7 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24454,7 +24433,7 @@ - (void)readAttributeBasicCommissioningInfoWithCompletion: using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24466,7 +24445,7 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -24504,7 +24483,7 @@ - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24513,7 +24492,7 @@ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24549,7 +24528,7 @@ - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Null using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24559,7 +24538,7 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No { using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24595,7 +24574,7 @@ - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24606,7 +24585,7 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa { using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24642,7 +24621,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24652,7 +24631,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24688,7 +24667,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24698,7 +24677,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24733,7 +24712,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24742,7 +24721,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24776,7 +24755,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24785,7 +24764,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24819,7 +24798,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24828,7 +24807,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -24862,7 +24841,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -24871,7 +24850,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25423,13 +25402,12 @@ @implementation MTRBaseClusterNetworkCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -25477,7 +25455,7 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25517,7 +25495,7 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25556,7 +25534,7 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25595,7 +25573,7 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25634,7 +25612,7 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25674,7 +25652,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa definedValue_0 = params.breadcrumb.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25685,7 +25663,7 @@ - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25694,7 +25672,7 @@ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25728,7 +25706,7 @@ - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25737,7 +25715,7 @@ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25771,7 +25749,7 @@ - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25781,7 +25759,7 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No { using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25816,7 +25794,7 @@ - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25826,7 +25804,7 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * { using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25861,7 +25839,7 @@ - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -25895,7 +25873,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -25907,7 +25885,7 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -25943,7 +25921,7 @@ - (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25954,7 +25932,7 @@ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _ using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -25990,7 +25968,7 @@ - (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -25999,7 +25977,7 @@ - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26033,7 +26011,7 @@ - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26043,7 +26021,7 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * { using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26079,7 +26057,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26089,7 +26067,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26125,7 +26103,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26135,7 +26113,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26170,7 +26148,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26179,7 +26157,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26213,7 +26191,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26222,7 +26200,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26256,7 +26234,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26265,7 +26243,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -26299,7 +26277,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -26308,7 +26286,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27004,13 +26982,12 @@ @implementation MTRBaseClusterDiagnosticLogs - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -27050,7 +27027,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque definedValue_0 = [self asCharSpan:params.transferFileDesignator]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -27061,7 +27038,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27071,7 +27048,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27106,7 +27083,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27116,7 +27093,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27151,7 +27128,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27160,7 +27137,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27194,7 +27171,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27203,7 +27180,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27237,7 +27214,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27246,7 +27223,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27280,7 +27257,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27289,7 +27266,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27565,13 +27542,12 @@ @implementation MTRBaseClusterGeneralDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -27608,7 +27584,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger request.enableKey = [self asByteSpan:params.enableKey]; request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -27619,7 +27595,7 @@ - (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27628,7 +27604,7 @@ - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27663,7 +27639,7 @@ - (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27672,7 +27648,7 @@ - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27706,7 +27682,7 @@ - (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27715,7 +27691,7 @@ - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27749,7 +27725,7 @@ - (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27759,7 +27735,7 @@ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * { using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27794,7 +27770,7 @@ - (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27803,7 +27779,7 @@ - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27837,7 +27813,7 @@ - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27847,7 +27823,7 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27882,7 +27858,7 @@ - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27891,7 +27867,7 @@ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27926,7 +27902,7 @@ - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27936,7 +27912,7 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -27972,7 +27948,7 @@ - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params @@ -27982,7 +27958,7 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams { using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28017,7 +27993,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28027,7 +28003,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28062,7 +28038,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28072,7 +28048,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28107,7 +28083,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28116,7 +28092,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28150,7 +28126,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28159,7 +28135,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28193,7 +28169,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28202,7 +28178,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28236,7 +28212,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28245,7 +28221,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -28910,13 +28886,12 @@ @implementation MTRBaseClusterSoftwareDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -28955,7 +28930,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -28966,7 +28941,7 @@ - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -28975,7 +28950,7 @@ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29009,7 +28984,7 @@ - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29018,7 +28993,7 @@ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29053,7 +29028,7 @@ - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29062,7 +29037,7 @@ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29098,7 +29073,7 @@ - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29108,7 +29083,7 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29144,7 +29119,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29154,7 +29129,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29189,7 +29164,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29199,7 +29174,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29234,7 +29209,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29243,7 +29218,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29277,7 +29252,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29286,7 +29261,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29320,7 +29295,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29329,7 +29304,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29363,7 +29338,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29372,7 +29347,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29822,13 +29797,12 @@ @implementation MTRBaseClusterThreadNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -29867,7 +29841,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -29878,7 +29852,7 @@ - (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29887,7 +29861,7 @@ - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29922,7 +29896,7 @@ - (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29931,7 +29905,7 @@ - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -29965,7 +29939,7 @@ - (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -29974,7 +29948,7 @@ - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30008,7 +29982,7 @@ - (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30017,7 +29991,7 @@ - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30051,7 +30025,7 @@ - (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30060,7 +30034,7 @@ - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30094,7 +30068,7 @@ - (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30103,7 +30077,7 @@ - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30137,7 +30111,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30146,7 +30120,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30180,7 +30154,7 @@ - (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30189,7 +30163,7 @@ - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30223,7 +30197,7 @@ - (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30232,7 +30206,7 @@ - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30266,7 +30240,7 @@ - (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30275,7 +30249,7 @@ - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30309,7 +30283,7 @@ - (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30318,7 +30292,7 @@ - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30352,7 +30326,7 @@ - (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30361,7 +30335,7 @@ - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30395,7 +30369,7 @@ - (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30404,7 +30378,7 @@ - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30439,7 +30413,7 @@ - (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30448,7 +30422,7 @@ - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30482,7 +30456,7 @@ - (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30491,7 +30465,7 @@ - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30526,7 +30500,7 @@ - (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30535,7 +30509,7 @@ - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30569,7 +30543,7 @@ - (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30578,7 +30552,7 @@ - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30613,7 +30587,7 @@ - (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30622,7 +30596,7 @@ - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30657,7 +30631,7 @@ - (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30667,7 +30641,7 @@ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _No { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30703,7 +30677,7 @@ - (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30713,7 +30687,7 @@ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30749,7 +30723,7 @@ - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30760,7 +30734,7 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscr { using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30796,7 +30770,7 @@ - (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30805,7 +30779,7 @@ - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30840,7 +30814,7 @@ - (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30849,7 +30823,7 @@ - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30883,7 +30857,7 @@ - (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30892,7 +30866,7 @@ - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30926,7 +30900,7 @@ - (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30935,7 +30909,7 @@ - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -30970,7 +30944,7 @@ - (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -30980,7 +30954,7 @@ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _N { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31015,7 +30989,7 @@ - (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31024,7 +30998,7 @@ - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31058,7 +31032,7 @@ - (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31068,7 +31042,7 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31103,7 +31077,7 @@ - (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31112,7 +31086,7 @@ - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31146,7 +31120,7 @@ - (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31155,7 +31129,7 @@ - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31190,7 +31164,7 @@ - (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31199,7 +31173,7 @@ - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31233,7 +31207,7 @@ - (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31243,7 +31217,7 @@ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31278,7 +31252,7 @@ - (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31287,7 +31261,7 @@ - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31321,7 +31295,7 @@ - (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31330,7 +31304,7 @@ - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31365,7 +31339,7 @@ - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31375,7 +31349,7 @@ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribePar { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31411,7 +31385,7 @@ - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31422,7 +31396,7 @@ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeP { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31457,7 +31431,7 @@ - (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31466,7 +31440,7 @@ - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31500,7 +31474,7 @@ - (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31509,7 +31483,7 @@ - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31544,7 +31518,7 @@ - (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31554,7 +31528,7 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31589,7 +31563,7 @@ - (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31598,7 +31572,7 @@ - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31632,7 +31606,7 @@ - (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31641,7 +31615,7 @@ - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31675,7 +31649,7 @@ - (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31684,7 +31658,7 @@ - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31719,7 +31693,7 @@ - (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31728,7 +31702,7 @@ - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31762,7 +31736,7 @@ - (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31771,7 +31745,7 @@ - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31806,7 +31780,7 @@ - (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31815,7 +31789,7 @@ - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31849,7 +31823,7 @@ - (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31859,7 +31833,7 @@ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31894,7 +31868,7 @@ - (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31903,7 +31877,7 @@ - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31938,7 +31912,7 @@ - (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31948,7 +31922,7 @@ - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -31984,7 +31958,7 @@ - (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -31994,7 +31968,7 @@ - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32029,7 +32003,7 @@ - (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32038,7 +32012,7 @@ - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32073,7 +32047,7 @@ - (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32082,7 +32056,7 @@ - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32118,7 +32092,7 @@ - (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32128,7 +32102,7 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParam { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32164,7 +32138,7 @@ - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32174,7 +32148,7 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32209,7 +32183,7 @@ - (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32218,7 +32192,7 @@ - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32252,7 +32226,7 @@ - (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32261,7 +32235,7 @@ - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32295,7 +32269,7 @@ - (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32304,7 +32278,7 @@ - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32339,7 +32313,7 @@ - (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32348,7 +32322,7 @@ - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32383,7 +32357,7 @@ - (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32392,7 +32366,7 @@ - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32427,7 +32401,7 @@ - (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32436,7 +32410,7 @@ - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32472,7 +32446,7 @@ - (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiag using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32483,7 +32457,7 @@ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -32518,7 +32492,7 @@ - (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32527,7 +32501,7 @@ - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32564,7 +32538,7 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void) @@ -32578,7 +32552,7 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -32617,7 +32591,7 @@ - (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32627,7 +32601,7 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32663,7 +32637,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32673,7 +32647,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32709,7 +32683,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32719,7 +32693,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32754,7 +32728,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32763,7 +32737,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32797,7 +32771,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32806,7 +32780,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32840,7 +32814,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32849,7 +32823,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -32883,7 +32857,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -32892,7 +32866,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -35965,13 +35939,12 @@ @implementation MTRBaseClusterWiFiNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -36010,7 +35983,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -36021,7 +35994,7 @@ - (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSE 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36030,7 +36003,7 @@ - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36065,7 +36038,7 @@ - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable v using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36074,7 +36047,7 @@ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36109,7 +36082,7 @@ - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36118,7 +36091,7 @@ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36152,7 +36125,7 @@ - (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36161,7 +36134,7 @@ - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36195,7 +36168,7 @@ - (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NS 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36204,7 +36177,7 @@ - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36238,7 +36211,7 @@ - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36247,7 +36220,7 @@ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36282,7 +36255,7 @@ - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36291,7 +36264,7 @@ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36326,7 +36299,7 @@ - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36336,7 +36309,7 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36372,7 +36345,7 @@ - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36382,7 +36355,7 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36417,7 +36390,7 @@ - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36427,7 +36400,7 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36462,7 +36435,7 @@ - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36472,7 +36445,7 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36507,7 +36480,7 @@ - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36516,7 +36489,7 @@ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36550,7 +36523,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36559,7 +36532,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36594,7 +36567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36604,7 +36577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36640,7 +36613,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36650,7 +36623,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36685,7 +36658,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36694,7 +36667,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36728,7 +36701,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36737,7 +36710,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36771,7 +36744,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36780,7 +36753,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -36814,7 +36787,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -36823,7 +36796,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37664,13 +37637,12 @@ @implementation MTRBaseClusterEthernetNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -37709,7 +37681,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -37721,7 +37693,7 @@ - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37730,7 +37702,7 @@ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37764,7 +37736,7 @@ - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37773,7 +37745,7 @@ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37807,7 +37779,7 @@ - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37816,7 +37788,7 @@ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37850,7 +37822,7 @@ - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37859,7 +37831,7 @@ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37893,7 +37865,7 @@ - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37902,7 +37874,7 @@ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37936,7 +37908,7 @@ - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37945,7 +37917,7 @@ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -37979,7 +37951,7 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -37988,7 +37960,7 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38022,7 +37994,7 @@ - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38031,7 +38003,7 @@ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38065,7 +38037,7 @@ - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38074,7 +38046,7 @@ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38109,7 +38081,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38119,7 +38091,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38155,7 +38127,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38165,7 +38137,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38200,7 +38172,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38209,7 +38181,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38244,7 +38216,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38253,7 +38225,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38287,7 +38259,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38296,7 +38268,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -38330,7 +38302,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -38339,7 +38311,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39001,13 +38973,12 @@ @implementation MTRBaseClusterTimeSynchronization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -39049,7 +39020,7 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa = static_cast>(params.timeSource.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39092,7 +39063,7 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT nonNullValue_0.endpoint = params.trustedTimeSource.endpoint.unsignedShortValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39153,7 +39124,7 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39217,7 +39188,7 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39259,7 +39230,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam nonNullValue_0 = [self asCharSpan:params.defaultNTP]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -39270,7 +39241,7 @@ - (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39279,7 +39250,7 @@ - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39313,7 +39284,7 @@ - (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39322,7 +39293,7 @@ - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39356,7 +39327,7 @@ - (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39365,7 +39336,7 @@ - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39401,7 +39372,7 @@ - (void)readAttributeTrustedTimeSourceWithCompletion: using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39413,7 +39384,7 @@ - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Non using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -39449,7 +39420,7 @@ - (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39458,7 +39429,7 @@ - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39492,7 +39463,7 @@ - (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39501,7 +39472,7 @@ - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39535,7 +39506,7 @@ - (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39544,7 +39515,7 @@ - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39578,7 +39549,7 @@ - (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39587,7 +39558,7 @@ - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39622,7 +39593,7 @@ - (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39631,7 +39602,7 @@ - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39666,7 +39637,7 @@ - (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39676,7 +39647,7 @@ - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39711,7 +39682,7 @@ - (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39721,7 +39692,7 @@ - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39756,7 +39727,7 @@ - (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39766,7 +39737,7 @@ - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39801,7 +39772,7 @@ - (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39811,7 +39782,7 @@ - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _No { using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39847,7 +39818,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39857,7 +39828,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39892,7 +39863,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39902,7 +39873,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39937,7 +39908,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39946,7 +39917,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39980,7 +39951,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -39989,7 +39960,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40023,7 +39994,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40032,7 +40003,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40066,7 +40037,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40075,7 +40046,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40111,13 +40082,12 @@ @implementation MTRBaseClusterBridgedDeviceBasicInformation - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -40127,7 +40097,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40136,7 +40106,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40170,7 +40140,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40179,7 +40149,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40213,7 +40183,7 @@ - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40222,7 +40192,7 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40256,7 +40226,7 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -40290,7 +40260,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -40302,7 +40272,7 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40336,7 +40306,7 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40345,7 +40315,7 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40380,7 +40350,7 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40390,7 +40360,7 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40425,7 +40395,7 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40434,7 +40404,7 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40469,7 +40439,7 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40479,7 +40449,7 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40514,7 +40484,7 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40523,7 +40493,7 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40558,7 +40528,7 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40567,7 +40537,7 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40601,7 +40571,7 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40610,7 +40580,7 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40644,7 +40614,7 @@ - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40653,7 +40623,7 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40687,7 +40657,7 @@ - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40696,7 +40666,7 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40730,7 +40700,7 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40739,7 +40709,7 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40773,7 +40743,7 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40782,7 +40752,7 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40819,7 +40789,7 @@ - (void)readAttributeProductAppearanceWithCompletion: using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40832,7 +40802,7 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void) @@ -40870,7 +40840,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40880,7 +40850,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40916,7 +40886,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40926,7 +40896,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40961,7 +40931,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -40970,7 +40940,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41005,7 +40975,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41014,7 +40984,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41048,7 +41018,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41057,7 +41027,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41091,7 +41061,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -41100,7 +41070,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42023,13 +41993,12 @@ @implementation MTRBaseClusterSwitch - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -42039,7 +42008,7 @@ - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42048,7 +42017,7 @@ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42083,7 +42052,7 @@ - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42092,7 +42061,7 @@ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42127,7 +42096,7 @@ - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42136,7 +42105,7 @@ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42170,7 +42139,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42180,7 +42149,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42215,7 +42184,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42225,7 +42194,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42260,7 +42229,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Switch::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42269,7 +42238,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Switch::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42303,7 +42272,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42312,7 +42281,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42346,7 +42315,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42355,7 +42324,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42389,7 +42358,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42398,7 +42367,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42795,13 +42764,12 @@ @implementation MTRBaseClusterAdministratorCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -42844,7 +42812,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO request.iterations = params.iterations.unsignedIntValue; request.salt = [self asByteSpan:params.salt]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42884,7 +42852,7 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu } request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42927,7 +42895,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -42939,7 +42907,7 @@ - (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable v using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42949,7 +42917,7 @@ - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -42982,7 +42950,7 @@ - (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -42991,7 +42959,7 @@ - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43026,7 +42994,7 @@ - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43035,7 +43003,7 @@ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43070,7 +43038,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43080,7 +43048,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43116,7 +43084,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43126,7 +43094,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43161,7 +43129,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43170,7 +43138,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43205,7 +43173,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43214,7 +43182,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43248,7 +43216,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43257,7 +43225,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43291,7 +43259,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -43300,7 +43268,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43715,13 +43683,12 @@ @implementation MTRBaseClusterOperationalCredentials - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -43755,7 +43722,7 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio } request.attestationNonce = [self asByteSpan:params.attestationNonce]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43791,7 +43758,7 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti request.certificateType = static_cast>(params.certificateType.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43830,7 +43797,7 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * definedValue_0 = params.isForUpdateNOC.boolValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43873,7 +43840,7 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params request.adminVendorId = static_cast>(params.adminVendorId.unsignedShortValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43912,7 +43879,7 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p definedValue_0 = [self asByteSpan:params.icacValue]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43947,7 +43914,7 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri } request.label = [self asCharSpan:params.label]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -43982,7 +43949,7 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara } request.fabricIndex = params.fabricIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -44019,7 +43986,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd } request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -44031,7 +43998,7 @@ - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44040,7 +44007,7 @@ - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44075,7 +44042,7 @@ - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44084,7 +44051,7 @@ - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44118,7 +44085,7 @@ - (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44127,7 +44094,7 @@ - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44162,7 +44129,7 @@ - (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44172,7 +44139,7 @@ - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44209,7 +44176,7 @@ - (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44219,7 +44186,7 @@ - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams { using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44254,7 +44221,7 @@ - (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44264,7 +44231,7 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No { using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44300,7 +44267,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44310,7 +44277,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44346,7 +44313,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44356,7 +44323,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44391,7 +44358,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44400,7 +44367,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44434,7 +44401,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44443,7 +44410,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44477,7 +44444,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44486,7 +44453,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44520,7 +44487,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -44529,7 +44496,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45140,13 +45107,12 @@ @implementation MTRBaseClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -45220,7 +45186,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45255,7 +45221,7 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par } request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45291,7 +45257,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * } request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45330,7 +45296,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45342,7 +45308,7 @@ - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -45399,7 +45365,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -45411,7 +45377,7 @@ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45446,7 +45412,7 @@ - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params params = [params copy]; using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45455,7 +45421,7 @@ - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45489,7 +45455,7 @@ - (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45499,7 +45465,7 @@ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _No { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45534,7 +45500,7 @@ - (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45544,7 +45510,7 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45579,7 +45545,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45589,7 +45555,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45624,7 +45590,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45634,7 +45600,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45669,7 +45635,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45678,7 +45644,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45712,7 +45678,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45721,7 +45687,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45755,7 +45721,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45764,7 +45730,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -45798,7 +45764,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -45807,7 +45773,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46290,13 +46256,12 @@ @implementation MTRBaseClusterFixedLabel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -46306,7 +46271,7 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46315,7 +46280,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46349,7 +46314,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46359,7 +46324,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46394,7 +46359,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46404,7 +46369,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46439,7 +46404,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46448,7 +46413,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46482,7 +46447,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46491,7 +46456,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46525,7 +46490,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46534,7 +46499,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46568,7 +46533,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -46577,7 +46542,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -46883,13 +46848,12 @@ @implementation MTRBaseClusterUserLabel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -46899,7 +46863,7 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -46955,7 +46919,7 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -46967,7 +46931,7 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47001,7 +46965,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47011,7 +46975,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47046,7 +47010,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47056,7 +47020,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47091,7 +47055,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47100,7 +47064,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47134,7 +47098,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47143,7 +47107,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47177,7 +47141,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47186,7 +47150,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47220,7 +47184,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47229,7 +47193,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47545,13 +47509,12 @@ @implementation MTRBaseClusterBooleanState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -47561,7 +47524,7 @@ - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47570,7 +47533,7 @@ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47604,7 +47567,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47614,7 +47577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47649,7 +47612,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47659,7 +47622,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47694,7 +47657,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47703,7 +47666,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47737,7 +47700,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47746,7 +47709,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47780,7 +47743,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47789,7 +47752,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -47823,7 +47786,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -47832,7 +47795,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48138,13 +48101,12 @@ @implementation MTRBaseClusterICDManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -48184,7 +48146,7 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) definedValue_0 = [self asByteSpan:params.verificationKey]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48225,7 +48187,7 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam definedValue_0 = [self asByteSpan:params.verificationKey]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48265,7 +48227,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48276,7 +48238,7 @@ - (void)readAttributeIdleModeIntervalWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::IdleModeInterval::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48285,7 +48247,7 @@ - (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IcdManagement::Attributes::IdleModeInterval::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48320,7 +48282,7 @@ - (void)readAttributeActiveModeIntervalWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ActiveModeInterval::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48330,7 +48292,7 @@ - (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams * _No { using TypeInfo = IcdManagement::Attributes::ActiveModeInterval::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48365,7 +48327,7 @@ - (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48375,7 +48337,7 @@ - (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _N { using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48411,7 +48373,7 @@ - (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)para params = [params copy]; using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48420,7 +48382,7 @@ - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48455,7 +48417,7 @@ - (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48464,7 +48426,7 @@ - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48499,7 +48461,7 @@ - (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48509,7 +48471,7 @@ - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParam { using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48544,7 +48506,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48554,7 +48516,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48589,7 +48551,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48599,7 +48561,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48634,7 +48596,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48643,7 +48605,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48677,7 +48639,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48686,7 +48648,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48720,7 +48682,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48729,7 +48691,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48763,7 +48725,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48772,7 +48734,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48808,13 +48770,12 @@ @implementation MTRBaseClusterModeSelect - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -48849,7 +48810,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -48860,7 +48821,7 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48869,7 +48830,7 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48903,7 +48864,7 @@ - (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48912,7 +48873,7 @@ - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48947,7 +48908,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48956,7 +48917,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -48990,7 +48951,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -48999,7 +48960,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49033,7 +48994,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -49072,7 +49033,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -49084,7 +49045,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49118,7 +49079,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -49157,7 +49118,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -49169,7 +49130,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49203,7 +49164,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49213,7 +49174,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49248,7 +49209,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49258,7 +49219,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49293,7 +49254,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49302,7 +49263,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49336,7 +49297,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49345,7 +49306,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49379,7 +49340,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49388,7 +49349,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49422,7 +49383,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -49431,7 +49392,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -49980,13 +49941,12 @@ @implementation MTRBaseClusterLaundryWasherMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -50020,7 +49980,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50031,7 +49991,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50040,7 +50000,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50074,7 +50034,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50083,7 +50043,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50117,7 +50077,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50156,7 +50116,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50168,7 +50128,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50202,7 +50162,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50241,7 +50201,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50253,7 +50213,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50287,7 +50247,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50297,7 +50257,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50332,7 +50292,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50342,7 +50302,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50377,7 +50337,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50386,7 +50346,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50420,7 +50380,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50429,7 +50389,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50463,7 +50423,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50472,7 +50432,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50506,7 +50466,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50515,7 +50475,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50551,13 +50511,12 @@ @implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -50596,7 +50555,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50608,7 +50567,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50618,7 +50577,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -50653,7 +50612,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50662,7 +50621,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50696,7 +50655,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50735,7 +50694,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50747,7 +50706,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50781,7 +50740,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -50820,7 +50779,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -50832,7 +50791,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50867,7 +50826,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50878,7 +50837,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute< MTRRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50916,7 +50875,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50927,7 +50886,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute< MTRRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -50965,7 +50924,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -50975,7 +50934,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -51009,7 +50968,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51019,7 +50978,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -51053,7 +51012,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51062,7 +51021,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51096,7 +51055,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51105,7 +51064,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51141,13 +51100,12 @@ @implementation MTRBaseClusterLaundryWasherControls - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -51157,7 +51115,7 @@ - (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51166,7 +51124,7 @@ - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51200,7 +51158,7 @@ - (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51239,7 +51197,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51251,7 +51209,7 @@ - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51287,7 +51245,7 @@ - (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -51321,7 +51279,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51333,7 +51291,7 @@ - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51367,7 +51325,7 @@ - (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51376,7 +51334,7 @@ - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51411,7 +51369,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51421,7 +51379,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51457,7 +51415,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51467,7 +51425,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51502,7 +51460,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51511,7 +51469,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51545,7 +51503,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51554,7 +51512,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51588,7 +51546,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51597,7 +51555,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51631,7 +51589,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51640,7 +51598,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51676,13 +51634,12 @@ @implementation MTRBaseClusterRVCRunMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -51716,7 +51673,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51727,7 +51684,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51736,7 +51693,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51770,7 +51727,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51779,7 +51736,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51813,7 +51770,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51852,7 +51809,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51864,7 +51821,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcRunMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51898,7 +51855,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -51937,7 +51894,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -51949,7 +51906,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -51983,7 +51940,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -51993,7 +51950,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52028,7 +51985,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52038,7 +51995,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52073,7 +52030,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52082,7 +52039,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52116,7 +52073,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52125,7 +52082,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52159,7 +52116,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52168,7 +52125,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52202,7 +52159,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52211,7 +52168,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52247,13 +52204,12 @@ @implementation MTRBaseClusterRVCCleanMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -52287,7 +52243,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52298,7 +52254,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52307,7 +52263,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52341,7 +52297,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52350,7 +52306,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52384,7 +52340,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52423,7 +52379,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52435,7 +52391,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RvcCleanMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52469,7 +52425,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -52508,7 +52464,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52520,7 +52476,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52554,7 +52510,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52564,7 +52520,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52599,7 +52555,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52609,7 +52565,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52644,7 +52600,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52653,7 +52609,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52687,7 +52643,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52696,7 +52652,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52730,7 +52686,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52739,7 +52695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52773,7 +52729,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52782,7 +52738,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52818,13 +52774,12 @@ @implementation MTRBaseClusterTemperatureControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -52869,7 +52824,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -52880,7 +52835,7 @@ - (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52890,7 +52845,7 @@ - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52925,7 +52880,7 @@ - (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52934,7 +52889,7 @@ - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -52968,7 +52923,7 @@ - (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -52977,7 +52932,7 @@ - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53011,7 +52966,7 @@ - (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53020,7 +52975,7 @@ - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53055,7 +53010,7 @@ - (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53065,7 +53020,7 @@ - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams { using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53102,7 +53057,7 @@ - (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)( using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53112,7 +53067,7 @@ - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribePara { using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53147,7 +53102,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53157,7 +53112,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53192,7 +53147,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53202,7 +53157,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53237,7 +53192,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53246,7 +53201,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53280,7 +53235,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53289,7 +53244,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53323,7 +53278,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53332,7 +53287,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53366,7 +53321,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53375,7 +53330,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53411,13 +53366,12 @@ @implementation MTRBaseClusterRefrigeratorAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -53427,7 +53381,7 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53436,7 +53390,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53470,7 +53424,7 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53479,7 +53433,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53513,7 +53467,7 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53522,7 +53476,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53556,7 +53510,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53566,7 +53520,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53601,7 +53555,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53611,7 +53565,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53646,7 +53600,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53655,7 +53609,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53689,7 +53643,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53698,7 +53652,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53732,7 +53686,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53741,7 +53695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53775,7 +53729,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53784,7 +53738,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53820,13 +53774,12 @@ @implementation MTRBaseClusterDishwasherMode - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -53860,7 +53813,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par } request.newMode = params.newMode.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -53871,7 +53824,7 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53880,7 +53833,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53914,7 +53867,7 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -53923,7 +53876,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -53957,7 +53910,7 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -53996,7 +53949,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54008,7 +53961,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54042,7 +53995,7 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -54081,7 +54034,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54093,7 +54046,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54127,7 +54080,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54137,7 +54090,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54172,7 +54125,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54182,7 +54135,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54217,7 +54170,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54226,7 +54179,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54260,7 +54213,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54269,7 +54222,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54303,7 +54256,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54312,7 +54265,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54346,7 +54299,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54355,7 +54308,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54391,13 +54344,12 @@ @implementation MTRBaseClusterAirQuality - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -54407,7 +54359,7 @@ - (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54416,7 +54368,7 @@ - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54450,7 +54402,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54460,7 +54412,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54495,7 +54447,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54505,7 +54457,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54540,7 +54492,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54549,7 +54501,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54583,7 +54535,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54592,7 +54544,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54626,7 +54578,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54635,7 +54587,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54669,7 +54621,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54678,7 +54630,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54714,13 +54666,12 @@ @implementation MTRBaseClusterSmokeCOAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -54759,7 +54710,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -54770,7 +54721,7 @@ - (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54779,7 +54730,7 @@ - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54813,7 +54764,7 @@ - (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54822,7 +54773,7 @@ - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54856,7 +54807,7 @@ - (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54865,7 +54816,7 @@ - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54899,7 +54850,7 @@ - (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54908,7 +54859,7 @@ - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54942,7 +54893,7 @@ - (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54951,7 +54902,7 @@ - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -54985,7 +54936,7 @@ - (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -54994,7 +54945,7 @@ - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55028,7 +54979,7 @@ - (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55038,7 +54989,7 @@ - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _No { using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55073,7 +55024,7 @@ - (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55082,7 +55033,7 @@ - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Non { using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55118,7 +55069,7 @@ - (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55128,7 +55079,7 @@ - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55163,7 +55114,7 @@ - (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55173,7 +55124,7 @@ - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _N { using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55208,7 +55159,7 @@ - (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55218,7 +55169,7 @@ - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _No { using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55253,7 +55204,7 @@ - (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -55287,7 +55238,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55300,7 +55251,7 @@ - (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * { using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55335,7 +55286,7 @@ - (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55344,7 +55295,7 @@ - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55378,7 +55329,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55388,7 +55339,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55423,7 +55374,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55433,7 +55384,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55468,7 +55419,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55477,7 +55428,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55511,7 +55462,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55520,7 +55471,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55554,7 +55505,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55563,7 +55514,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55597,7 +55548,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55606,7 +55557,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55642,13 +55593,12 @@ @implementation MTRBaseClusterDishwasherAlarm - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -55683,7 +55633,7 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completio } request.alarms = static_cast>(params.alarms.unsignedIntValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55720,7 +55670,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla } request.mask = static_cast>(params.mask.unsignedIntValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -55731,7 +55681,7 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55740,7 +55690,7 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55774,7 +55724,7 @@ - (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55783,7 +55733,7 @@ - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55817,7 +55767,7 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55826,7 +55776,7 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55860,7 +55810,7 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55869,7 +55819,7 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55903,7 +55853,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55913,7 +55863,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55948,7 +55898,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -55958,7 +55908,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -55993,7 +55943,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56002,7 +55952,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56036,7 +55986,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56045,7 +55995,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56079,7 +56029,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56088,7 +56038,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56122,7 +56072,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56131,7 +56081,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56167,13 +56117,12 @@ @implementation MTRBaseClusterOperationalState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -56211,7 +56160,7 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56250,7 +56199,7 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56289,7 +56238,7 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56328,7 +56277,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56339,7 +56288,7 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56348,7 +56297,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56382,7 +56331,7 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56391,7 +56340,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56425,7 +56374,7 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56434,7 +56383,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56468,7 +56417,7 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56478,7 +56427,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56514,7 +56463,7 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56523,7 +56472,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56560,7 +56509,7 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStat using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56571,7 +56520,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -56605,7 +56554,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56615,7 +56564,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56650,7 +56599,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56660,7 +56609,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56695,7 +56644,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56704,7 +56653,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56738,7 +56687,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56747,7 +56696,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56781,7 +56730,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56790,7 +56739,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56824,7 +56773,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -56833,7 +56782,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -56869,13 +56818,12 @@ @implementation MTRBaseClusterRVCOperationalState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -56913,7 +56861,7 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56952,7 +56900,7 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -56991,7 +56939,7 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57030,7 +56978,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57041,7 +56989,7 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57050,7 +56998,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57084,7 +57032,7 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57093,7 +57041,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57127,7 +57075,7 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57136,7 +57084,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57171,7 +57119,7 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57181,7 +57129,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57216,7 +57164,7 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57225,7 +57173,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57262,7 +57210,7 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalS using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57273,7 +57221,7 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -57309,7 +57257,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57319,7 +57267,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57354,7 +57302,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57364,7 +57312,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57399,7 +57347,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57408,7 +57356,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57442,7 +57390,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57451,7 +57399,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57485,7 +57433,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57494,7 +57442,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57528,7 +57476,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57537,7 +57485,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57573,13 +57521,12 @@ @implementation MTRBaseClusterHEPAFilterMonitoring - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -57618,7 +57565,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57629,7 +57576,7 @@ - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57638,7 +57585,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57673,7 +57620,7 @@ - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57683,7 +57630,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ { using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57719,7 +57666,7 @@ - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57728,7 +57675,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57763,7 +57710,7 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57772,7 +57719,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57807,7 +57754,7 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -57846,7 +57793,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -57858,7 +57805,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57894,7 +57841,7 @@ - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _N using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57904,7 +57851,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * { using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57940,7 +57887,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57950,7 +57897,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -57986,7 +57933,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -57996,7 +57943,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58031,7 +57978,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58040,7 +57987,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58074,7 +58021,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58083,7 +58030,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58117,7 +58064,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58126,7 +58073,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58160,7 +58107,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58169,7 +58116,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58205,13 +58152,12 @@ @implementation MTRBaseClusterActivatedCarbonFilterMonitoring - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -58250,7 +58196,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58261,7 +58207,7 @@ - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable valu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58270,7 +58216,7 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58305,7 +58251,7 @@ - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58316,7 +58262,7 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -58351,7 +58297,7 @@ - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullab using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58361,7 +58307,7 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -58395,7 +58341,7 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58404,7 +58350,7 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58439,7 +58385,7 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -58478,7 +58424,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58490,7 +58436,7 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58526,7 +58472,7 @@ - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _N using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58536,7 +58482,7 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58572,7 +58518,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58582,7 +58528,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58618,7 +58564,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58628,7 +58574,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58664,7 +58610,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58673,7 +58619,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58708,7 +58654,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58717,7 +58663,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58751,7 +58697,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58760,7 +58706,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58794,7 +58740,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -58803,7 +58749,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -58839,13 +58785,12 @@ @implementation MTRBaseClusterDoorLock - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -58888,7 +58833,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58932,7 +58877,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -58975,7 +58920,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * definedValue_0 = [self asByteSpan:params.pinCode]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59017,7 +58962,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams request.endHour = params.endHour.unsignedCharValue; request.endMinute = params.endMinute.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59053,7 +58998,7 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59091,7 +59036,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa request.weekDayIndex = params.weekDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59130,7 +59075,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams request.localStartTime = params.localStartTime.unsignedIntValue; request.localEndTime = params.localEndTime.unsignedIntValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59166,7 +59111,7 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams request.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59204,7 +59149,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa request.yearDayIndex = params.yearDayIndex.unsignedCharValue; request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59244,7 +59189,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams request.operatingMode = static_cast>(params.operatingMode.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59279,7 +59224,7 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams } request.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59316,7 +59261,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa } request.holidayIndex = params.holidayIndex.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59389,7 +59334,7 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:( = static_cast>(params.credentialRule.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59422,7 +59367,7 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params } request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59461,7 +59406,7 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completi } request.userIndex = params.userIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59523,7 +59468,7 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59560,7 +59505,7 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara params.credential.credentialType.unsignedCharValue); request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59606,7 +59551,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59650,7 +59595,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59661,7 +59606,7 @@ - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59670,7 +59615,7 @@ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59704,7 +59649,7 @@ - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59713,7 +59658,7 @@ - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59747,7 +59692,7 @@ - (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59756,7 +59701,7 @@ - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59791,7 +59736,7 @@ - (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -59800,7 +59745,7 @@ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59834,7 +59779,7 @@ - (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -59868,7 +59813,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59880,7 +59825,7 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59914,7 +59859,7 @@ - (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -59948,7 +59893,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -59960,7 +59905,7 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -59995,7 +59940,7 @@ - (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60029,7 +59974,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60041,7 +59986,7 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60076,7 +60021,7 @@ - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60086,7 +60031,7 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar { using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60122,7 +60067,7 @@ - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60132,7 +60077,7 @@ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParam { using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60168,7 +60113,7 @@ - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60178,7 +60123,7 @@ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribePara { using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60214,7 +60159,7 @@ - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(voi 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60225,7 +60170,7 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT { using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60262,7 +60207,7 @@ - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(voi 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60273,7 +60218,7 @@ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MT { using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60310,7 +60255,7 @@ - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60321,7 +60266,7 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr { using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60357,7 +60302,7 @@ - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60366,7 +60311,7 @@ - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60401,7 +60346,7 @@ - (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60410,7 +60355,7 @@ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60445,7 +60390,7 @@ - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60454,7 +60399,7 @@ - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60489,7 +60434,7 @@ - (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60498,7 +60443,7 @@ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60534,7 +60479,7 @@ - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60544,7 +60489,7 @@ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60580,7 +60525,7 @@ - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^) 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params @@ -60591,7 +60536,7 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs { using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60627,7 +60572,7 @@ - (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60661,7 +60606,7 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60673,7 +60618,7 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = DoorLock::Attributes::Language::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60707,7 +60652,7 @@ - (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60741,7 +60686,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60753,7 +60698,7 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60787,7 +60732,7 @@ - (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60821,7 +60766,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60833,7 +60778,7 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60867,7 +60812,7 @@ - (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60901,7 +60846,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60913,7 +60858,7 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -60947,7 +60892,7 @@ - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -60981,7 +60926,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -60993,7 +60938,7 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61028,7 +60973,7 @@ - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61038,7 +60983,7 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61074,7 +61019,7 @@ - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61085,7 +61030,7 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61121,7 +61066,7 @@ - (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61155,7 +61100,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61168,7 +61113,7 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61203,7 +61148,7 @@ - (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61237,7 +61182,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61250,7 +61195,7 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61285,7 +61230,7 @@ - (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61319,7 +61264,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61332,7 +61277,7 @@ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * { using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61368,7 +61313,7 @@ - (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61402,7 +61347,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61415,7 +61360,7 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61451,7 +61396,7 @@ - (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61485,7 +61430,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61498,7 +61443,7 @@ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams { using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61533,7 +61478,7 @@ - (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61567,7 +61512,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61580,7 +61525,7 @@ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61616,7 +61561,7 @@ - (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61650,7 +61595,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61664,7 +61609,7 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61699,7 +61644,7 @@ - (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61733,7 +61678,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61745,7 +61690,7 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non { using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61781,7 +61726,7 @@ - (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61815,7 +61760,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61829,7 +61774,7 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa { using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61864,7 +61809,7 @@ - (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -61898,7 +61843,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -61911,7 +61856,7 @@ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61946,7 +61891,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -61956,7 +61901,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -61991,7 +61936,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62001,7 +61946,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62036,7 +61981,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62045,7 +61990,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62079,7 +62024,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62088,7 +62033,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62122,7 +62067,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62131,7 +62076,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -62165,7 +62110,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -62174,7 +62119,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64359,13 +64304,12 @@ @implementation MTRBaseClusterWindowCovering - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -64403,7 +64347,7 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64443,7 +64387,7 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64482,7 +64426,7 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64518,7 +64462,7 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p } request.liftValue = params.liftValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64555,7 +64499,7 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage } request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64591,7 +64535,7 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p } request.tiltValue = params.tiltValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64628,7 +64572,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage } request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -64639,7 +64583,7 @@ - (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NS 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64648,7 +64592,7 @@ - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64683,7 +64627,7 @@ - (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64693,7 +64637,7 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64729,7 +64673,7 @@ - (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64739,7 +64683,7 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64774,7 +64718,7 @@ - (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64784,7 +64728,7 @@ - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64819,7 +64763,7 @@ - (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64829,7 +64773,7 @@ - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64865,7 +64809,7 @@ - (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64875,7 +64819,7 @@ - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64911,7 +64855,7 @@ - (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64921,7 +64865,7 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -64956,7 +64900,7 @@ - (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -64965,7 +64909,7 @@ - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65000,7 +64944,7 @@ - (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65011,7 +64955,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeP { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65047,7 +64991,7 @@ - (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65058,7 +65002,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeP { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65093,7 +65037,7 @@ - (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65102,7 +65046,7 @@ - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Non { using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65138,7 +65082,7 @@ - (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65149,7 +65093,7 @@ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscrib { using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65186,7 +65130,7 @@ - (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65197,7 +65141,7 @@ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscrib { using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65233,7 +65177,7 @@ - (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65242,7 +65186,7 @@ - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65277,7 +65221,7 @@ - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NS 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65288,7 +65232,7 @@ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscri { using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65325,7 +65269,7 @@ - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NS 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65336,7 +65280,7 @@ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscri { using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65373,7 +65317,7 @@ - (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65383,7 +65327,7 @@ - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65419,7 +65363,7 @@ - (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65429,7 +65373,7 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65465,7 +65409,7 @@ - (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65475,7 +65419,7 @@ - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65511,7 +65455,7 @@ - (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65521,7 +65465,7 @@ - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65556,7 +65500,7 @@ - (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NS 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -65590,7 +65534,7 @@ - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -65602,7 +65546,7 @@ - (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65636,7 +65580,7 @@ - (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65645,7 +65589,7 @@ - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65679,7 +65623,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65689,7 +65633,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65724,7 +65668,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65734,7 +65678,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65769,7 +65713,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65778,7 +65722,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65812,7 +65756,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65821,7 +65765,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65855,7 +65799,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65864,7 +65808,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -65898,7 +65842,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -65907,7 +65851,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67210,13 +67154,12 @@ @implementation MTRBaseClusterBarrierControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -67252,7 +67195,7 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont } request.percentOpen = params.percentOpen.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67292,7 +67235,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67303,7 +67246,7 @@ - (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67313,7 +67256,7 @@ - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67348,7 +67291,7 @@ - (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67358,7 +67301,7 @@ - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67393,7 +67336,7 @@ - (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67403,7 +67346,7 @@ - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67438,7 +67381,7 @@ - (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67472,7 +67415,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67484,7 +67427,7 @@ - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67519,7 +67462,7 @@ - (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67553,7 +67496,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67566,7 +67509,7 @@ - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67602,7 +67545,7 @@ - (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67636,7 +67579,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)val TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67649,7 +67592,7 @@ - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams { using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67685,7 +67628,7 @@ - (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67719,7 +67662,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67732,7 +67675,7 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParam { using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67767,7 +67710,7 @@ - (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67801,7 +67744,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67813,7 +67756,7 @@ - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Non { using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67848,7 +67791,7 @@ - (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -67882,7 +67825,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -67895,7 +67838,7 @@ - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _No { using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67930,7 +67873,7 @@ - (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67939,7 +67882,7 @@ - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -67974,7 +67917,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -67984,7 +67927,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68019,7 +67962,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68029,7 +67972,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68064,7 +68007,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68073,7 +68016,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68107,7 +68050,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68116,7 +68059,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68150,7 +68093,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68159,7 +68102,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68193,7 +68136,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -68202,7 +68145,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -68994,13 +68937,12 @@ @implementation MTRBaseClusterPumpConfigurationAndControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -69010,7 +68952,7 @@ - (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69019,7 +68961,7 @@ - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69053,7 +68995,7 @@ - (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69062,7 +69004,7 @@ - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69096,7 +69038,7 @@ - (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69105,7 +69047,7 @@ - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69139,7 +69081,7 @@ - (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69148,7 +69090,7 @@ - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69183,7 +69125,7 @@ - (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69192,7 +69134,7 @@ - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69227,7 +69169,7 @@ - (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69236,7 +69178,7 @@ - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69271,7 +69213,7 @@ - (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69280,7 +69222,7 @@ - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69315,7 +69257,7 @@ - (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69324,7 +69266,7 @@ - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69358,7 +69300,7 @@ - (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69367,7 +69309,7 @@ - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69401,7 +69343,7 @@ - (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69410,7 +69352,7 @@ - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69444,7 +69386,7 @@ - (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69453,7 +69395,7 @@ - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69487,7 +69429,7 @@ - (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69496,7 +69438,7 @@ - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69530,7 +69472,7 @@ - (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69539,7 +69481,7 @@ - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69573,7 +69515,7 @@ - (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69582,7 +69524,7 @@ - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69618,7 +69560,7 @@ - (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69628,7 +69570,7 @@ - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69664,7 +69606,7 @@ - (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nu using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69674,7 +69616,7 @@ - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69709,7 +69651,7 @@ - (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69718,7 +69660,7 @@ - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69752,7 +69694,7 @@ - (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69761,7 +69703,7 @@ - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69795,7 +69737,7 @@ - (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -69834,7 +69776,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -69847,7 +69789,7 @@ - (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69882,7 +69824,7 @@ - (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -69891,7 +69833,7 @@ - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -69926,7 +69868,7 @@ - (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -69965,7 +69907,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -69978,7 +69920,7 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70014,7 +69956,7 @@ - (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -70048,7 +69990,7 @@ - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -70060,7 +70002,7 @@ - (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70095,7 +70037,7 @@ - (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable va using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -70129,7 +70071,7 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -70141,7 +70083,7 @@ - (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70176,7 +70118,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70186,7 +70128,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70222,7 +70164,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70232,7 +70174,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70267,7 +70209,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70276,7 +70218,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70311,7 +70253,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70320,7 +70262,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70354,7 +70296,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70363,7 +70305,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -70397,7 +70339,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -70406,7 +70348,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71707,13 +71649,12 @@ @implementation MTRBaseClusterThermostat - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -71750,7 +71691,7 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara request.mode = static_cast>(params.mode.unsignedCharValue); request.amount = params.amount.charValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71824,7 +71765,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71862,7 +71803,7 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams request.modeToReturn = static_cast>(params.modeToReturn.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71902,7 +71843,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -71913,7 +71854,7 @@ - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71922,7 +71863,7 @@ - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -71957,7 +71898,7 @@ - (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -71967,7 +71908,7 @@ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72002,7 +71943,7 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72011,7 +71952,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72046,7 +71987,7 @@ - (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72056,7 +71997,7 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72092,7 +72033,7 @@ - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72102,7 +72043,7 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72138,7 +72079,7 @@ - (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72148,7 +72089,7 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72184,7 +72125,7 @@ - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72194,7 +72135,7 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72229,7 +72170,7 @@ - (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72238,7 +72179,7 @@ - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72273,7 +72214,7 @@ - (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params @@ -72282,7 +72223,7 @@ - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72318,7 +72259,7 @@ - (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72352,7 +72293,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72365,7 +72306,7 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribePar { using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72401,7 +72342,7 @@ - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72435,7 +72376,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72448,7 +72389,7 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribePar { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72484,7 +72425,7 @@ - (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72518,7 +72459,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72531,7 +72472,7 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72567,7 +72508,7 @@ - (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72601,7 +72542,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72614,7 +72555,7 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72650,7 +72591,7 @@ - (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72684,7 +72625,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72697,7 +72638,7 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72733,7 +72674,7 @@ - (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72767,7 +72708,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72780,7 +72721,7 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72815,7 +72756,7 @@ - (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72849,7 +72790,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72862,7 +72803,7 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72897,7 +72838,7 @@ - (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -72931,7 +72872,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -72944,7 +72885,7 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -72979,7 +72920,7 @@ - (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73013,7 +72954,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73026,7 +72967,7 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73061,7 +73002,7 @@ - (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73095,7 +73036,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73108,7 +73049,7 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73143,7 +73084,7 @@ - (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73177,7 +73118,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73190,7 +73131,7 @@ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _N { using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73225,7 +73166,7 @@ - (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73259,7 +73200,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73271,7 +73212,7 @@ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73307,7 +73248,7 @@ - (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73341,7 +73282,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)v TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73354,7 +73295,7 @@ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribePara { using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73389,7 +73330,7 @@ - (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73423,7 +73364,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73435,7 +73376,7 @@ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73469,7 +73410,7 @@ - (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73479,7 +73420,7 @@ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * { using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73514,7 +73455,7 @@ - (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73523,7 +73464,7 @@ - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73558,7 +73499,7 @@ - (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73568,7 +73509,7 @@ - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParam { using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73604,7 +73545,7 @@ - (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73614,7 +73555,7 @@ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73650,7 +73591,7 @@ - (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -73684,7 +73625,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73697,7 +73638,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73733,7 +73674,7 @@ - (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value @@ -73773,7 +73714,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Null nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73787,7 +73728,7 @@ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscrib { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73824,7 +73765,7 @@ - (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value @@ -73859,7 +73800,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -73873,7 +73814,7 @@ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubsc { using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73910,7 +73851,7 @@ - (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73920,7 +73861,7 @@ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * { using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -73955,7 +73896,7 @@ - (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -73965,7 +73906,7 @@ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74000,7 +73941,7 @@ - (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74010,7 +73951,7 @@ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74046,7 +73987,7 @@ - (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74057,7 +73998,7 @@ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeP { using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74092,7 +74033,7 @@ - (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -74131,7 +74072,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74143,7 +74084,7 @@ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74178,7 +74119,7 @@ - (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74188,7 +74129,7 @@ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74223,7 +74164,7 @@ - (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74233,7 +74174,7 @@ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74268,7 +74209,7 @@ - (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -74307,7 +74248,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74319,7 +74260,7 @@ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74354,7 +74295,7 @@ - (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74364,7 +74305,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74399,7 +74340,7 @@ - (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -74409,7 +74350,7 @@ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74444,7 +74385,7 @@ - (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74478,7 +74419,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74491,7 +74432,7 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _No { using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74526,7 +74467,7 @@ - (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74560,7 +74501,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74572,7 +74513,7 @@ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74606,7 +74547,7 @@ - (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74640,7 +74581,7 @@ - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74652,7 +74593,7 @@ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74686,7 +74627,7 @@ - (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74720,7 +74661,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74732,7 +74673,7 @@ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74767,7 +74708,7 @@ - (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74801,7 +74742,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74813,7 +74754,7 @@ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74848,7 +74789,7 @@ - (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74882,7 +74823,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74894,7 +74835,7 @@ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -74928,7 +74869,7 @@ - (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -74962,7 +74903,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -74974,7 +74915,7 @@ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75009,7 +74950,7 @@ - (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75018,7 +74959,7 @@ - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75053,7 +74994,7 @@ - (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -75087,7 +75028,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -75099,7 +75040,7 @@ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75134,7 +75075,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75144,7 +75085,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75179,7 +75120,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75189,7 +75130,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75224,7 +75165,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75233,7 +75174,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75267,7 +75208,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75276,7 +75217,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75310,7 +75251,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75319,7 +75260,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -75353,7 +75294,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -75362,7 +75303,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78126,13 +78067,12 @@ @implementation MTRBaseClusterFanControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -78176,7 +78116,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRS definedValue_0 = params.lowestOff.boolValue; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78187,7 +78127,7 @@ - (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78221,7 +78161,7 @@ - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78233,7 +78173,7 @@ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78267,7 +78207,7 @@ - (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78301,7 +78241,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78313,7 +78253,7 @@ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78348,7 +78288,7 @@ - (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -78387,7 +78327,7 @@ - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78399,7 +78339,7 @@ - (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78433,7 +78373,7 @@ - (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78442,7 +78382,7 @@ - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78476,7 +78416,7 @@ - (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78485,7 +78425,7 @@ - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78519,7 +78459,7 @@ - (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -78558,7 +78498,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78570,7 +78510,7 @@ - (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78604,7 +78544,7 @@ - (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78613,7 +78553,7 @@ - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78647,7 +78587,7 @@ - (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78656,7 +78596,7 @@ - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78690,7 +78630,7 @@ - (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78724,7 +78664,7 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78736,7 +78676,7 @@ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78770,7 +78710,7 @@ - (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78779,7 +78719,7 @@ - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78813,7 +78753,7 @@ - (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78847,7 +78787,7 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78859,7 +78799,7 @@ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78893,7 +78833,7 @@ - (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -78927,7 +78867,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -78939,7 +78879,7 @@ - (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -78974,7 +78914,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -78984,7 +78924,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79019,7 +78959,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79029,7 +78969,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79064,7 +79004,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FanControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79073,7 +79013,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FanControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79107,7 +79047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79116,7 +79056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79150,7 +79090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79159,7 +79099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79193,7 +79133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -79202,7 +79142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -79999,13 +79939,12 @@ @implementation MTRBaseClusterThermostatUserInterfaceConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -80016,7 +79955,7 @@ - (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80050,7 +79989,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80063,7 +80002,7 @@ - (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80098,7 +80037,7 @@ - (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80132,7 +80071,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80144,7 +80083,7 @@ - (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80179,7 +80118,7 @@ - (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -80213,7 +80152,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -80227,7 +80166,7 @@ - (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeP { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80263,7 +80202,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80274,7 +80213,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -80309,7 +80248,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80320,7 +80259,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -80355,7 +80294,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80364,7 +80303,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80399,7 +80338,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80408,7 +80347,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80442,7 +80381,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80451,7 +80390,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80485,7 +80424,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -80494,7 +80433,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -80924,13 +80863,12 @@ @implementation MTRBaseClusterColorControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -80970,7 +80908,7 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81009,7 +80947,7 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completi request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81049,7 +80987,7 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completi request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81088,7 +81026,7 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81127,7 +81065,7 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81167,7 +81105,7 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81208,7 +81146,7 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81248,7 +81186,7 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81287,7 +81225,7 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81327,7 +81265,7 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params comp request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81367,7 +81305,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81409,7 +81347,7 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81448,7 +81386,7 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81488,7 +81426,7 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81529,7 +81467,7 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81573,7 +81511,7 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81610,7 +81548,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81652,7 +81590,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81695,7 +81633,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -81706,7 +81644,7 @@ - (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81715,7 +81653,7 @@ - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81749,7 +81687,7 @@ - (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81758,7 +81696,7 @@ - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81793,7 +81731,7 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81802,7 +81740,7 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81836,7 +81774,7 @@ - (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81845,7 +81783,7 @@ - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81879,7 +81817,7 @@ - (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81888,7 +81826,7 @@ - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81922,7 +81860,7 @@ - (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81931,7 +81869,7 @@ - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -81966,7 +81904,7 @@ - (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params @@ -81975,7 +81913,7 @@ - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82011,7 +81949,7 @@ - (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82021,7 +81959,7 @@ - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * { using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82056,7 +81994,7 @@ - (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82065,7 +82003,7 @@ - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82099,7 +82037,7 @@ - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -82133,7 +82071,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -82145,7 +82083,7 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ColorControl::Attributes::Options::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82179,7 +82117,7 @@ - (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82188,7 +82126,7 @@ - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82223,7 +82161,7 @@ - (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82232,7 +82170,7 @@ - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82266,7 +82204,7 @@ - (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82275,7 +82213,7 @@ - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82309,7 +82247,7 @@ - (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82318,7 +82256,7 @@ - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82353,7 +82291,7 @@ - (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82362,7 +82300,7 @@ - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82396,7 +82334,7 @@ - (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82405,7 +82343,7 @@ - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82439,7 +82377,7 @@ - (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82448,7 +82386,7 @@ - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82483,7 +82421,7 @@ - (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82492,7 +82430,7 @@ - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82526,7 +82464,7 @@ - (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82535,7 +82473,7 @@ - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82569,7 +82507,7 @@ - (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82578,7 +82516,7 @@ - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82613,7 +82551,7 @@ - (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82622,7 +82560,7 @@ - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82656,7 +82594,7 @@ - (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82665,7 +82603,7 @@ - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82699,7 +82637,7 @@ - (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82708,7 +82646,7 @@ - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82743,7 +82681,7 @@ - (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82752,7 +82690,7 @@ - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82786,7 +82724,7 @@ - (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82795,7 +82733,7 @@ - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82829,7 +82767,7 @@ - (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82838,7 +82776,7 @@ - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82873,7 +82811,7 @@ - (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82882,7 +82820,7 @@ - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82916,7 +82854,7 @@ - (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82925,7 +82863,7 @@ - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -82959,7 +82897,7 @@ - (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -82968,7 +82906,7 @@ - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83003,7 +82941,7 @@ - (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83037,7 +82975,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83049,7 +82987,7 @@ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83083,7 +83021,7 @@ - (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83117,7 +83055,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83129,7 +83067,7 @@ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83163,7 +83101,7 @@ - (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83197,7 +83135,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83209,7 +83147,7 @@ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83243,7 +83181,7 @@ - (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83277,7 +83215,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83289,7 +83227,7 @@ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83323,7 +83261,7 @@ - (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83362,7 +83300,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83375,7 +83313,7 @@ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83410,7 +83348,7 @@ - (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83444,7 +83382,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83456,7 +83394,7 @@ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83490,7 +83428,7 @@ - (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83524,7 +83462,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83536,7 +83474,7 @@ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83570,7 +83508,7 @@ - (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83609,7 +83547,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83622,7 +83560,7 @@ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83657,7 +83595,7 @@ - (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83691,7 +83629,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83703,7 +83641,7 @@ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83737,7 +83675,7 @@ - (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -83771,7 +83709,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83783,7 +83721,7 @@ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83817,7 +83755,7 @@ - (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -83856,7 +83794,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -83869,7 +83807,7 @@ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83904,7 +83842,7 @@ - (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -83914,7 +83852,7 @@ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _No { using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83949,7 +83887,7 @@ - (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -83958,7 +83896,7 @@ - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -83993,7 +83931,7 @@ - (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84002,7 +83940,7 @@ - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84037,7 +83975,7 @@ - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84047,7 +83985,7 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84082,7 +84020,7 @@ - (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84091,7 +84029,7 @@ - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84126,7 +84064,7 @@ - (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84136,7 +84074,7 @@ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParam { using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84172,7 +84110,7 @@ - (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84182,7 +84120,7 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84217,7 +84155,7 @@ - (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84226,7 +84164,7 @@ - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84262,7 +84200,7 @@ - (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84272,7 +84210,7 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84308,7 +84246,7 @@ - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84318,7 +84256,7 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribePara { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84354,7 +84292,7 @@ - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84365,7 +84303,7 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscrib { using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84402,7 +84340,7 @@ - (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -84441,7 +84379,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -84455,7 +84393,7 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeP { using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84490,7 +84428,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84500,7 +84438,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84535,7 +84473,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84545,7 +84483,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84580,7 +84518,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84589,7 +84527,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84623,7 +84561,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84632,7 +84570,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84666,7 +84604,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84675,7 +84613,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -84709,7 +84647,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -84718,7 +84656,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87476,13 +87414,12 @@ @implementation MTRBaseClusterBallastConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -87492,7 +87429,7 @@ - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87501,7 +87438,7 @@ - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87536,7 +87473,7 @@ - (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87545,7 +87482,7 @@ - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87580,7 +87517,7 @@ - (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87589,7 +87526,7 @@ - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87623,7 +87560,7 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -87657,7 +87594,7 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87669,7 +87606,7 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87703,7 +87640,7 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -87737,7 +87674,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87749,7 +87686,7 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87784,7 +87721,7 @@ - (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -87823,7 +87760,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87836,7 +87773,7 @@ - (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * { using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87872,7 +87809,7 @@ - (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -87911,7 +87848,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)val nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -87924,7 +87861,7 @@ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams { using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -87959,7 +87896,7 @@ - (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params @@ -87968,7 +87905,7 @@ - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88002,7 +87939,7 @@ - (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88036,7 +87973,7 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88048,7 +87985,7 @@ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88082,7 +88019,7 @@ - (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88116,7 +88053,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88128,7 +88065,7 @@ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88163,7 +88100,7 @@ - (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88202,7 +88139,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88214,7 +88151,7 @@ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88248,7 +88185,7 @@ - (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88287,7 +88224,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88299,7 +88236,7 @@ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88333,7 +88270,7 @@ - (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -88367,7 +88304,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88379,7 +88316,7 @@ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88414,7 +88351,7 @@ - (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -88453,7 +88390,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -88466,7 +88403,7 @@ - (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * { using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88502,7 +88439,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88512,7 +88449,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88548,7 +88485,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88558,7 +88495,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88593,7 +88530,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88602,7 +88539,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88636,7 +88573,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88645,7 +88582,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88679,7 +88616,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88688,7 +88625,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -88722,7 +88659,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -88731,7 +88668,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89710,13 +89647,12 @@ @implementation MTRBaseClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -89726,7 +89662,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89735,7 +89671,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89769,7 +89705,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89778,7 +89714,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89813,7 +89749,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89822,7 +89758,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89857,7 +89793,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89866,7 +89802,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89901,7 +89837,7 @@ - (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89910,7 +89846,7 @@ - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89946,7 +89882,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -89956,7 +89892,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -89992,7 +89928,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90002,7 +89938,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90037,7 +89973,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90046,7 +89982,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90080,7 +90016,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90089,7 +90025,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90123,7 +90059,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90132,7 +90068,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90166,7 +90102,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90175,7 +90111,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90657,13 +90593,12 @@ @implementation MTRBaseClusterTemperatureMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -90673,7 +90608,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90682,7 +90617,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90716,7 +90651,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90725,7 +90660,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90760,7 +90695,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90769,7 +90704,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90804,7 +90739,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90813,7 +90748,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90848,7 +90783,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90858,7 +90793,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90894,7 +90829,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90904,7 +90839,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90939,7 +90874,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90948,7 +90883,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -90982,7 +90917,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -90991,7 +90926,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91025,7 +90960,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91034,7 +90969,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91068,7 +91003,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91077,7 +91012,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91515,13 +91450,12 @@ @implementation MTRBaseClusterPressureMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -91531,7 +91465,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91540,7 +91474,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91574,7 +91508,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91583,7 +91517,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91618,7 +91552,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91627,7 +91561,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91662,7 +91596,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91671,7 +91605,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91705,7 +91639,7 @@ - (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91714,7 +91648,7 @@ - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91748,7 +91682,7 @@ - (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91757,7 +91691,7 @@ - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91791,7 +91725,7 @@ - (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91800,7 +91734,7 @@ - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91834,7 +91768,7 @@ - (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91843,7 +91777,7 @@ - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91878,7 +91812,7 @@ - (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91887,7 +91821,7 @@ - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91922,7 +91856,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91932,7 +91866,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -91967,7 +91901,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -91977,7 +91911,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92012,7 +91946,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92021,7 +91955,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92055,7 +91989,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92064,7 +91998,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92098,7 +92032,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92107,7 +92041,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92141,7 +92075,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92150,7 +92084,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92804,13 +92738,12 @@ @implementation MTRBaseClusterFlowMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -92820,7 +92753,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92829,7 +92762,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92863,7 +92796,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92872,7 +92805,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92907,7 +92840,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92916,7 +92849,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92951,7 +92884,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -92960,7 +92893,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -92994,7 +92927,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93004,7 +92937,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93039,7 +92972,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93049,7 +92982,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93084,7 +93017,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93093,7 +93026,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93127,7 +93060,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93136,7 +93069,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93170,7 +93103,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93179,7 +93112,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93213,7 +93146,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93222,7 +93155,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93660,13 +93593,12 @@ @implementation MTRBaseClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -93676,7 +93608,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93685,7 +93617,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93719,7 +93651,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93728,7 +93660,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93763,7 +93695,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93772,7 +93704,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93807,7 +93739,7 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93816,7 +93748,7 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93851,7 +93783,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93861,7 +93793,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93897,7 +93829,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93907,7 +93839,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93942,7 +93874,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93951,7 +93883,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -93986,7 +93918,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -93995,7 +93927,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94029,7 +93961,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94038,7 +93970,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94072,7 +94004,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94081,7 +94013,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94519,13 +94451,12 @@ @implementation MTRBaseClusterOccupancySensing - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -94535,7 +94466,7 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94544,7 +94475,7 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94579,7 +94510,7 @@ - (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nul using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94589,7 +94520,7 @@ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _N { using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94625,7 +94556,7 @@ - (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -94635,7 +94566,7 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParam { using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94671,7 +94602,7 @@ - (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -94705,7 +94636,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94719,7 +94650,7 @@ - (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribePa { using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94755,7 +94686,7 @@ - (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -94789,7 +94720,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94803,7 +94734,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribePa { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94839,7 +94770,7 @@ - (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NS 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -94874,7 +94805,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Non TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94888,7 +94819,7 @@ - (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscri { using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -94925,7 +94856,7 @@ - (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^) 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -94960,7 +94891,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -94974,7 +94905,7 @@ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubs { using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95011,7 +94942,7 @@ - (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^) 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95046,7 +94977,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _ TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95060,7 +94991,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubs { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95097,7 +95028,7 @@ - (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -95134,7 +95065,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95148,7 +95079,7 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTR { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95185,7 +95116,7 @@ - (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(voi 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95222,7 +95153,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95236,7 +95167,7 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MT { using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95273,7 +95204,7 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(voi 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value @@ -95310,7 +95241,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumbe TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95324,7 +95255,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MT { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95361,7 +95292,7 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value @@ -95398,7 +95329,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSN TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -95412,7 +95343,7 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95448,7 +95379,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95458,7 +95389,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95493,7 +95424,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95503,7 +95434,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95538,7 +95469,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95547,7 +95478,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95581,7 +95512,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95590,7 +95521,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95624,7 +95555,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95633,7 +95564,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -95667,7 +95598,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -95676,7 +95607,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96605,13 +96536,12 @@ @implementation MTRBaseClusterCarbonMonoxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -96621,7 +96551,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96630,7 +96560,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96664,7 +96594,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96673,7 +96603,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96708,7 +96638,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96717,7 +96647,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96752,7 +96682,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96761,7 +96691,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96797,7 +96727,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96807,7 +96737,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96842,7 +96772,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96852,7 +96782,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96888,7 +96818,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96898,7 +96828,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96933,7 +96863,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96942,7 +96872,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -96977,7 +96907,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -96987,7 +96917,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97023,7 +96953,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97033,7 +96963,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97070,7 +97000,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97080,7 +97010,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97114,7 +97044,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97125,7 +97055,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97160,7 +97090,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97171,7 +97101,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97206,7 +97136,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97215,7 +97145,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97250,7 +97180,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97259,7 +97189,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97293,7 +97223,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97302,7 +97232,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97336,7 +97266,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97345,7 +97275,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97381,13 +97311,12 @@ @implementation MTRBaseClusterCarbonDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -97397,7 +97326,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97406,7 +97335,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97440,7 +97369,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97449,7 +97378,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97484,7 +97413,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97493,7 +97422,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97528,7 +97457,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97537,7 +97466,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97573,7 +97502,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97583,7 +97512,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97618,7 +97547,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97628,7 +97557,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97664,7 +97593,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97674,7 +97603,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97709,7 +97638,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97718,7 +97647,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -97753,7 +97682,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97763,7 +97692,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97799,7 +97728,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97809,7 +97738,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97846,7 +97775,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97856,7 +97785,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97890,7 +97819,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97901,7 +97830,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97936,7 +97865,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97947,7 +97876,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -97982,7 +97911,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -97991,7 +97920,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98026,7 +97955,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98035,7 +97964,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98069,7 +97998,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98078,7 +98007,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98112,7 +98041,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98121,7 +98050,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98157,13 +98086,12 @@ @implementation MTRBaseClusterNitrogenDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -98173,7 +98101,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98182,7 +98110,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98216,7 +98144,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98225,7 +98153,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98260,7 +98188,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98269,7 +98197,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98304,7 +98232,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98313,7 +98241,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98349,7 +98277,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98359,7 +98287,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98394,7 +98322,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98404,7 +98332,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98440,7 +98368,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98450,7 +98378,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98485,7 +98413,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98494,7 +98422,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98529,7 +98457,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98539,7 +98467,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98576,7 +98504,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98586,7 +98514,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98623,7 +98551,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98633,7 +98561,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98667,7 +98595,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98678,7 +98606,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98714,7 +98642,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98725,7 +98653,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -98760,7 +98688,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98769,7 +98697,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98804,7 +98732,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98813,7 +98741,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98847,7 +98775,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98856,7 +98784,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98890,7 +98818,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98899,7 +98827,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98935,13 +98863,12 @@ @implementation MTRBaseClusterOzoneConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -98951,7 +98878,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -98960,7 +98887,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -98994,7 +98921,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99003,7 +98930,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99038,7 +98965,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99047,7 +98974,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99082,7 +99009,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99091,7 +99018,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99127,7 +99054,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99137,7 +99064,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99172,7 +99099,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99182,7 +99109,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99218,7 +99145,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99228,7 +99155,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99263,7 +99190,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99272,7 +99199,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99307,7 +99234,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99316,7 +99243,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99352,7 +99279,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99361,7 +99288,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99397,7 +99324,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99406,7 +99333,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99441,7 +99368,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99451,7 +99378,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99487,7 +99414,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99497,7 +99424,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99532,7 +99459,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99541,7 +99468,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99576,7 +99503,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99585,7 +99512,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99619,7 +99546,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99628,7 +99555,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99662,7 +99589,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99671,7 +99598,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99707,13 +99634,12 @@ @implementation MTRBaseClusterPM25ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -99723,7 +99649,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99732,7 +99658,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99766,7 +99692,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99775,7 +99701,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99810,7 +99736,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99819,7 +99745,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99854,7 +99780,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99863,7 +99789,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99899,7 +99825,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99909,7 +99835,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99944,7 +99870,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -99954,7 +99880,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -99990,7 +99916,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100000,7 +99926,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100035,7 +99961,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100044,7 +99970,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100079,7 +100005,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100088,7 +100014,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100124,7 +100050,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100133,7 +100059,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100169,7 +100095,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100178,7 +100104,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100213,7 +100139,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100223,7 +100149,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100259,7 +100185,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100269,7 +100195,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100304,7 +100230,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100313,7 +100239,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100348,7 +100274,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100357,7 +100283,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100391,7 +100317,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100400,7 +100326,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100434,7 +100360,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100443,7 +100369,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100479,13 +100405,12 @@ @implementation MTRBaseClusterFormaldehydeConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -100495,7 +100420,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100504,7 +100429,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100538,7 +100463,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100547,7 +100472,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100582,7 +100507,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100591,7 +100516,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100626,7 +100551,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100635,7 +100560,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100671,7 +100596,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100681,7 +100606,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100716,7 +100641,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100726,7 +100651,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100762,7 +100687,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100772,7 +100697,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100807,7 +100732,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100816,7 +100741,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100851,7 +100776,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100861,7 +100786,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -100896,7 +100821,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100906,7 +100831,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -100942,7 +100867,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100951,7 +100876,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -100986,7 +100911,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -100997,7 +100922,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -101032,7 +100957,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101043,7 +100968,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -101078,7 +101003,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101087,7 +101012,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101122,7 +101047,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101131,7 +101056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101165,7 +101090,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101174,7 +101099,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101208,7 +101133,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101217,7 +101142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101253,13 +101178,12 @@ @implementation MTRBaseClusterPM1ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -101269,7 +101193,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101278,7 +101202,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101312,7 +101236,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101321,7 +101245,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101356,7 +101280,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101365,7 +101289,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101400,7 +101324,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101409,7 +101333,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101445,7 +101369,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101455,7 +101379,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101490,7 +101414,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101500,7 +101424,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101536,7 +101460,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101546,7 +101470,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101581,7 +101505,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101590,7 +101514,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101625,7 +101549,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101634,7 +101558,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101670,7 +101594,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101679,7 +101603,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101715,7 +101639,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101724,7 +101648,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101759,7 +101683,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101769,7 +101693,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101805,7 +101729,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101815,7 +101739,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101850,7 +101774,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101859,7 +101783,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101894,7 +101818,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101903,7 +101827,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101937,7 +101861,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101946,7 +101870,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -101980,7 +101904,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -101989,7 +101913,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102025,13 +101949,12 @@ @implementation MTRBaseClusterPM10ConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -102041,7 +101964,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102050,7 +101973,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102084,7 +102007,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102093,7 +102016,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102128,7 +102051,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102137,7 +102060,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102172,7 +102095,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102181,7 +102104,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102217,7 +102140,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102227,7 +102150,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102262,7 +102185,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102272,7 +102195,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102308,7 +102231,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102318,7 +102241,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102353,7 +102276,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102362,7 +102285,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102397,7 +102320,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102406,7 +102329,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102442,7 +102365,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102451,7 +102374,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102487,7 +102410,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102496,7 +102419,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102531,7 +102454,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102541,7 +102464,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102577,7 +102500,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102587,7 +102510,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102622,7 +102545,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102631,7 +102554,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102666,7 +102589,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102675,7 +102598,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102709,7 +102632,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102718,7 +102641,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102752,7 +102675,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102761,7 +102684,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102797,13 +102720,12 @@ @implementation MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurem - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -102813,7 +102735,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102822,7 +102744,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102856,7 +102778,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102865,7 +102787,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102900,7 +102822,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102909,7 +102831,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102944,7 +102866,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102953,7 +102875,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -102989,7 +102911,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -102999,7 +102921,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103035,7 +102957,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103045,7 +102967,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103081,7 +103003,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103091,7 +103013,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103127,7 +103049,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103136,7 +103058,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103172,7 +103094,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl return MTRReadAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackBridge, NSNumber, TypeInfo::DecodableType>( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103183,7 +103105,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementUnitEnumAttributeCallbackSubscriptionBridge, NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103221,7 +103143,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla return MTRReadAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackBridge, NSNumber, TypeInfo::DecodableType>( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103232,7 +103154,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterMeasurementMediumEnumAttributeCallbackSubscriptionBridge, NSNumber, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103269,7 +103191,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103279,7 +103201,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementClusterLevelValueEnumAttributeCallbackSubscriptionBridge, NSNumber, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103316,7 +103238,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103328,7 +103250,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge, NSArray, TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103365,7 +103287,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103376,7 +103298,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103414,7 +103336,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103424,7 +103346,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -103460,7 +103382,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103470,7 +103392,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute< MTRTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeListListAttributeCallbackSubscriptionBridge, NSArray, - TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103506,7 +103428,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103515,7 +103437,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103549,7 +103471,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103558,7 +103480,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103594,13 +103516,12 @@ @implementation MTRBaseClusterRadonConcentrationMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -103610,7 +103531,7 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103619,7 +103540,7 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103653,7 +103574,7 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103662,7 +103583,7 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103697,7 +103618,7 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103706,7 +103627,7 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103741,7 +103662,7 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103750,7 +103671,7 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103786,7 +103707,7 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103796,7 +103717,7 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams { using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103831,7 +103752,7 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103841,7 +103762,7 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103877,7 +103798,7 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)( MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103887,7 +103808,7 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara { using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103922,7 +103843,7 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103931,7 +103852,7 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -103966,7 +103887,7 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params @@ -103975,7 +103896,7 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104011,7 +103932,7 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104020,7 +103941,7 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non { using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104056,7 +103977,7 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104065,7 +103986,7 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104100,7 +104021,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104110,7 +104031,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104146,7 +104067,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104156,7 +104077,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104191,7 +104112,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104200,7 +104121,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104235,7 +104156,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104244,7 +104165,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104278,7 +104199,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104287,7 +104208,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104321,7 +104242,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104330,7 +104251,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104366,13 +104287,12 @@ @implementation MTRBaseClusterWakeOnLAN - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -104382,7 +104302,7 @@ - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104391,7 +104311,7 @@ - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104425,7 +104345,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104435,7 +104355,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104470,7 +104390,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104480,7 +104400,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104515,7 +104435,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104524,7 +104444,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104558,7 +104478,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104567,7 +104487,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104601,7 +104521,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104610,7 +104530,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104644,7 +104564,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -104653,7 +104573,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -104962,13 +104882,12 @@ @implementation MTRBaseClusterChannel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -105001,7 +104920,7 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params } request.match = [self asCharSpan:params.match]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105039,7 +104958,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP request.majorNumber = params.majorNumber.unsignedShortValue; request.minorNumber = params.minorNumber.unsignedShortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105075,7 +104994,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl } request.count = params.count.shortValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105086,7 +105005,7 @@ - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105095,7 +105014,7 @@ - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105131,7 +105050,7 @@ - (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfoS using TypeInfo = Channel::Attributes::Lineup::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105141,7 +105060,7 @@ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = Channel::Attributes::Lineup::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105178,7 +105097,7 @@ - (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterCha using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105188,7 +105107,7 @@ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105223,7 +105142,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105233,7 +105152,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105268,7 +105187,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105278,7 +105197,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105313,7 +105232,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Channel::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105322,7 +105241,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = Channel::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105356,7 +105275,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105365,7 +105284,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105399,7 +105318,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105408,7 +105327,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105442,7 +105361,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105451,7 +105370,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105869,13 +105788,12 @@ @implementation MTRBaseClusterTargetNavigator - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -105913,7 +105831,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -105924,7 +105842,7 @@ - (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105933,7 +105851,7 @@ - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -105967,7 +105885,7 @@ - (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull)params @@ -105976,7 +105894,7 @@ - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106010,7 +105928,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106020,7 +105938,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106055,7 +105973,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106065,7 +105983,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106100,7 +106018,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106109,7 +106027,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106143,7 +106061,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106152,7 +106070,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106186,7 +106104,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106195,7 +106113,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106229,7 +106147,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -106238,7 +106156,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -106600,13 +106518,12 @@ @implementation MTRBaseClusterMediaPlayback - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -106644,7 +106561,7 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106683,7 +106600,7 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106722,7 +106639,7 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106761,7 +106678,7 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106800,7 +106717,7 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106839,7 +106756,7 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106878,7 +106795,7 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106917,7 +106834,7 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106952,7 +106869,7 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params } request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -106987,7 +106904,7 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para } request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -107022,7 +106939,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params } request.position = params.position.unsignedLongLongValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -107033,7 +106950,7 @@ - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107042,7 +106959,7 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107076,7 +106993,7 @@ - (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107085,7 +107002,7 @@ - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107119,7 +107036,7 @@ - (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107128,7 +107045,7 @@ - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107164,7 +107081,7 @@ - (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClu using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107175,7 +107092,7 @@ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -107209,7 +107126,7 @@ - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107218,7 +107135,7 @@ - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107252,7 +107169,7 @@ - (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107261,7 +107178,7 @@ - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107295,7 +107212,7 @@ - (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107304,7 +107221,7 @@ - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107338,7 +107255,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107348,7 +107265,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107383,7 +107300,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107393,7 +107310,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107428,7 +107345,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107437,7 +107354,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107471,7 +107388,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107480,7 +107397,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107514,7 +107431,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107523,7 +107440,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -107557,7 +107474,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -107566,7 +107483,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108287,13 +108204,12 @@ @implementation MTRBaseClusterMediaInput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -108328,7 +108244,7 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params co } request.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108368,7 +108284,7 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108408,7 +108324,7 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108445,7 +108361,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co request.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -108456,7 +108372,7 @@ - (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108465,7 +108381,7 @@ - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108499,7 +108415,7 @@ - (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108508,7 +108424,7 @@ - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108542,7 +108458,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108552,7 +108468,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108587,7 +108503,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108597,7 +108513,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108632,7 +108548,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108641,7 +108557,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108675,7 +108591,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108684,7 +108600,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108718,7 +108634,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108727,7 +108643,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -108761,7 +108677,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -108770,7 +108686,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109148,13 +109064,12 @@ @implementation MTRBaseClusterLowPower - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -109192,7 +109107,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -109203,7 +109118,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109213,7 +109128,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109248,7 +109163,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109258,7 +109173,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109293,7 +109208,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = LowPower::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109302,7 +109217,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = LowPower::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109336,7 +109251,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109345,7 +109260,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109379,7 +109294,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109388,7 +109303,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109422,7 +109337,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109431,7 +109346,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109704,13 +109619,12 @@ @implementation MTRBaseClusterKeypadInput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -109743,7 +109657,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params } request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -109754,7 +109668,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109764,7 +109678,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109799,7 +109713,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109809,7 +109723,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109844,7 +109758,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109853,7 +109767,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109887,7 +109801,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109896,7 +109810,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109930,7 +109844,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109939,7 +109853,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -109973,7 +109887,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -109982,7 +109896,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110257,13 +110171,12 @@ @implementation MTRBaseClusterContentLauncher - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -110354,7 +110267,7 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) definedValue_0 = [self asCharSpan:params.data]; } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110487,7 +110400,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110498,7 +110411,7 @@ - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110507,7 +110420,7 @@ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110542,7 +110455,7 @@ - (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -110576,7 +110489,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -110589,7 +110502,7 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar { using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110624,7 +110537,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110634,7 +110547,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110669,7 +110582,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110679,7 +110592,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110714,7 +110627,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110723,7 +110636,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110757,7 +110670,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110766,7 +110679,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110800,7 +110713,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110809,7 +110722,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -110843,7 +110756,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -110852,7 +110765,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111236,13 +111149,12 @@ @implementation MTRBaseClusterAudioOutput - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -111277,7 +111189,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params } request.index = params.index.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -111314,7 +111226,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params request.index = params.index.unsignedCharValue; request.name = [self asCharSpan:params.name]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -111325,7 +111237,7 @@ - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111334,7 +111246,7 @@ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111368,7 +111280,7 @@ - (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111377,7 +111289,7 @@ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111411,7 +111323,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111421,7 +111333,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111456,7 +111368,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111466,7 +111378,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111501,7 +111413,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111510,7 +111422,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111544,7 +111456,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111553,7 +111465,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111587,7 +111499,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111596,7 +111508,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -111630,7 +111542,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -111639,7 +111551,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112000,13 +111912,12 @@ @implementation MTRBaseClusterApplicationLauncher - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -112050,7 +111961,7 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112091,7 +112002,7 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112132,7 +112043,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112143,7 +112054,7 @@ - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112152,7 +112063,7 @@ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112188,7 +112099,7 @@ - (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherCl using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value @@ -112235,7 +112146,7 @@ - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicat } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -112249,7 +112160,7 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -112284,7 +112195,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112294,7 +112205,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112329,7 +112240,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112339,7 +112250,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112374,7 +112285,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112383,7 +112294,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112417,7 +112328,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112426,7 +112337,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112460,7 +112371,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112469,7 +112380,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112503,7 +112414,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112512,7 +112423,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112908,13 +112819,12 @@ @implementation MTRBaseClusterApplicationBasic - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -112924,7 +112834,7 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112933,7 +112843,7 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -112967,7 +112877,7 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -112976,7 +112886,7 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113010,7 +112920,7 @@ - (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113019,7 +112929,7 @@ - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113054,7 +112964,7 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113063,7 +112973,7 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113099,7 +113009,7 @@ - (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClus using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113110,7 +113020,7 @@ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, - self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -113145,7 +113055,7 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113154,7 +113064,7 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113188,7 +113098,7 @@ - (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113198,7 +113108,7 @@ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _No { using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113233,7 +113143,7 @@ - (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113242,7 +113152,7 @@ - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113277,7 +113187,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113287,7 +113197,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113322,7 +113232,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113332,7 +113242,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113367,7 +113277,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113376,7 +113286,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113410,7 +113320,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113419,7 +113329,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113453,7 +113363,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113462,7 +113372,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -113496,7 +113406,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -113505,7 +113415,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114121,13 +114031,12 @@ @implementation MTRBaseClusterAccountLogin - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -114164,7 +114073,7 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params } request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114204,7 +114113,7 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:( request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; request.setupPIN = [self asCharSpan:params.setupPIN]; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114246,7 +114155,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114257,7 +114166,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114267,7 +114176,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114302,7 +114211,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114312,7 +114221,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114347,7 +114256,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114356,7 +114265,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114390,7 +114299,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114399,7 +114308,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114433,7 +114342,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114442,7 +114351,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114476,7 +114385,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114485,7 +114394,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114773,13 +114682,12 @@ @implementation MTRBaseClusterElectricalMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -114818,7 +114726,7 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114857,7 +114765,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG request.startTime = params.startTime.unsignedIntValue; request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -114868,7 +114776,7 @@ - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114877,7 +114785,7 @@ - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114912,7 +114820,7 @@ - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114921,7 +114829,7 @@ - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114955,7 +114863,7 @@ - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -114964,7 +114872,7 @@ - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -114998,7 +114906,7 @@ - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115007,7 +114915,7 @@ - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115041,7 +114949,7 @@ - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115050,7 +114958,7 @@ - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115084,7 +114992,7 @@ - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115093,7 +115001,7 @@ - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115127,7 +115035,7 @@ - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115136,7 +115044,7 @@ - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115170,7 +115078,7 @@ - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115179,7 +115087,7 @@ - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115213,7 +115121,7 @@ - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115222,7 +115130,7 @@ - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115256,7 +115164,7 @@ - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115265,7 +115173,7 @@ - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115299,7 +115207,7 @@ - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115309,7 +115217,7 @@ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115344,7 +115252,7 @@ - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115353,7 +115261,7 @@ - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115388,7 +115296,7 @@ - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115398,7 +115306,7 @@ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115433,7 +115341,7 @@ - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115442,7 +115350,7 @@ - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115477,7 +115385,7 @@ - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115486,7 +115394,7 @@ - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115521,7 +115429,7 @@ - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115530,7 +115438,7 @@ - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115564,7 +115472,7 @@ - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115573,7 +115481,7 @@ - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115607,7 +115515,7 @@ - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115616,7 +115524,7 @@ - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115650,7 +115558,7 @@ - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115659,7 +115567,7 @@ - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115693,7 +115601,7 @@ - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115702,7 +115610,7 @@ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115736,7 +115644,7 @@ - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115745,7 +115653,7 @@ - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115780,7 +115688,7 @@ - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115790,7 +115698,7 @@ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115825,7 +115733,7 @@ - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115835,7 +115743,7 @@ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115871,7 +115779,7 @@ - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115881,7 +115789,7 @@ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115917,7 +115825,7 @@ - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115927,7 +115835,7 @@ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -115963,7 +115871,7 @@ - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -115973,7 +115881,7 @@ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116009,7 +115917,7 @@ - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116019,7 +115927,7 @@ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116055,7 +115963,7 @@ - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116065,7 +115973,7 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116101,7 +116009,7 @@ - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116111,7 +116019,7 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116147,7 +116055,7 @@ - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116158,7 +116066,7 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116195,7 +116103,7 @@ - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116206,7 +116114,7 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116243,7 +116151,7 @@ - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116254,7 +116162,7 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116291,7 +116199,7 @@ - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116302,7 +116210,7 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116339,7 +116247,7 @@ - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSN 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116350,7 +116258,7 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscrib { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116387,7 +116295,7 @@ - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NS 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116398,7 +116306,7 @@ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscri { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116434,7 +116342,7 @@ - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116444,7 +116352,7 @@ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116479,7 +116387,7 @@ - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116489,7 +116397,7 @@ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116524,7 +116432,7 @@ - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116533,7 +116441,7 @@ - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116568,7 +116476,7 @@ - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116577,7 +116485,7 @@ - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull) { using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116612,7 +116520,7 @@ - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116622,7 +116530,7 @@ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116658,7 +116566,7 @@ - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116669,7 +116577,7 @@ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribe { using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116704,7 +116612,7 @@ - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116714,7 +116622,7 @@ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116750,7 +116658,7 @@ - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116760,7 +116668,7 @@ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116796,7 +116704,7 @@ - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116806,7 +116714,7 @@ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribePara { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116842,7 +116750,7 @@ - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116853,7 +116761,7 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribePa { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116888,7 +116796,7 @@ - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116898,7 +116806,7 @@ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116933,7 +116841,7 @@ - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116942,7 +116850,7 @@ - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -116976,7 +116884,7 @@ - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -116985,7 +116893,7 @@ - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117019,7 +116927,7 @@ - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117028,7 +116936,7 @@ - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117062,7 +116970,7 @@ - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117071,7 +116979,7 @@ - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117105,7 +117013,7 @@ - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117114,7 +117022,7 @@ - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117148,7 +117056,7 @@ - (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117157,7 +117065,7 @@ - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117191,7 +117099,7 @@ - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117200,7 +117108,7 @@ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117234,7 +117142,7 @@ - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117243,7 +117151,7 @@ - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117277,7 +117185,7 @@ - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117286,7 +117194,7 @@ - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117320,7 +117228,7 @@ - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117329,7 +117237,7 @@ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117363,7 +117271,7 @@ - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117372,7 +117280,7 @@ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117406,7 +117314,7 @@ - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117415,7 +117323,7 @@ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117450,7 +117358,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value @@ -117485,7 +117393,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _N TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117499,7 +117407,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117536,7 +117444,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117570,7 +117478,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnul TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117584,7 +117492,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeP { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117620,7 +117528,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117654,7 +117562,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117667,7 +117575,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117703,7 +117611,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117737,7 +117645,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117751,7 +117659,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribePa { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117786,7 +117694,7 @@ - (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117820,7 +117728,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117833,7 +117741,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117868,7 +117776,7 @@ - (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -117902,7 +117810,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -117915,7 +117823,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117950,7 +117858,7 @@ - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -117960,7 +117868,7 @@ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -117995,7 +117903,7 @@ - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118004,7 +117912,7 @@ - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118039,7 +117947,7 @@ - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118049,7 +117957,7 @@ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118084,7 +117992,7 @@ - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118093,7 +118001,7 @@ - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118128,7 +118036,7 @@ - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118137,7 +118045,7 @@ - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118172,7 +118080,7 @@ - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118181,7 +118089,7 @@ - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118215,7 +118123,7 @@ - (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -118249,7 +118157,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -118262,7 +118170,7 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _No { using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118297,7 +118205,7 @@ - (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118306,7 +118214,7 @@ - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118341,7 +118249,7 @@ - (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118350,7 +118258,7 @@ - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118385,7 +118293,7 @@ - (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -118419,7 +118327,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -118432,7 +118340,7 @@ - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118467,7 +118375,7 @@ - (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118476,7 +118384,7 @@ - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118511,7 +118419,7 @@ - (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118520,7 +118428,7 @@ - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118555,7 +118463,7 @@ - (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118565,7 +118473,7 @@ - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118601,7 +118509,7 @@ - (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118611,7 +118519,7 @@ - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams { using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118646,7 +118554,7 @@ - (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118656,7 +118564,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118692,7 +118600,7 @@ - (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118702,7 +118610,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118737,7 +118645,7 @@ - (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118747,7 +118655,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118783,7 +118691,7 @@ - (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118793,7 +118701,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118828,7 +118736,7 @@ - (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118837,7 +118745,7 @@ - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118871,7 +118779,7 @@ - (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118880,7 +118788,7 @@ - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118915,7 +118823,7 @@ - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118924,7 +118832,7 @@ - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -118959,7 +118867,7 @@ - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -118969,7 +118877,7 @@ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119004,7 +118912,7 @@ - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119014,7 +118922,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119049,7 +118957,7 @@ - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119058,7 +118966,7 @@ - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119093,7 +119001,7 @@ - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119103,7 +119011,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119138,7 +119046,7 @@ - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119148,7 +119056,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119183,7 +119091,7 @@ - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119192,7 +119100,7 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119227,7 +119135,7 @@ - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119237,7 +119145,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119272,7 +119180,7 @@ - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119282,7 +119190,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119317,7 +119225,7 @@ - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119326,7 +119234,7 @@ - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119361,7 +119269,7 @@ - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119371,7 +119279,7 @@ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119406,7 +119314,7 @@ - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119416,7 +119324,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119451,7 +119359,7 @@ - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119461,7 +119369,7 @@ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119496,7 +119404,7 @@ - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119506,7 +119414,7 @@ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119541,7 +119449,7 @@ - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119550,7 +119458,7 @@ - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119586,7 +119494,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(voi 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119597,7 +119505,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MT { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119634,7 +119542,7 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119645,7 +119553,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119682,7 +119590,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^) 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119693,7 +119601,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubs { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119730,7 +119638,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119741,7 +119649,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscr { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119778,7 +119686,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119789,7 +119697,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119826,7 +119734,7 @@ - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119836,7 +119744,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119872,7 +119780,7 @@ - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119882,7 +119790,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119917,7 +119825,7 @@ - (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119926,7 +119834,7 @@ - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -119961,7 +119869,7 @@ - (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -119971,7 +119879,7 @@ - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120006,7 +119914,7 @@ - (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120016,7 +119924,7 @@ - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120051,7 +119959,7 @@ - (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120060,7 +119968,7 @@ - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120095,7 +120003,7 @@ - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120105,7 +120013,7 @@ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120140,7 +120048,7 @@ - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120150,7 +120058,7 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120185,7 +120093,7 @@ - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120194,7 +120102,7 @@ - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120229,7 +120137,7 @@ - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120239,7 +120147,7 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120274,7 +120182,7 @@ - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120284,7 +120192,7 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120319,7 +120227,7 @@ - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120328,7 +120236,7 @@ - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120363,7 +120271,7 @@ - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120373,7 +120281,7 @@ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120408,7 +120316,7 @@ - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120418,7 +120326,7 @@ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120453,7 +120361,7 @@ - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120463,7 +120371,7 @@ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120498,7 +120406,7 @@ - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120508,7 +120416,7 @@ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120543,7 +120451,7 @@ - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120552,7 +120460,7 @@ - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Non { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120588,7 +120496,7 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(voi 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120599,7 +120507,7 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MT { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120636,7 +120544,7 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120647,7 +120555,7 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120684,7 +120592,7 @@ - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^) 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120695,7 +120603,7 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubs { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120732,7 +120640,7 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120743,7 +120651,7 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscr { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120780,7 +120688,7 @@ - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120791,7 +120699,7 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubsc { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120828,7 +120736,7 @@ - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120838,7 +120746,7 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParam { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120874,7 +120782,7 @@ - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)( 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120884,7 +120792,7 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribePar { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120920,7 +120828,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120930,7 +120838,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -120966,7 +120874,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -120976,7 +120884,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121011,7 +120919,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121020,7 +120928,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121054,7 +120962,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121063,7 +120971,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121097,7 +121005,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121106,7 +121014,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -121140,7 +121048,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -121149,7 +121057,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -127240,13 +127148,12 @@ @implementation MTRBaseClusterUnitTesting - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } _device = device; - _endpoint = [endpointID unsignedShortValue]; } return self; } @@ -127284,7 +127191,7 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params compl } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127324,7 +127231,7 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127363,7 +127270,7 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127403,7 +127310,7 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127439,7 +127346,7 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams request.arg1 = params.arg1.unsignedCharValue; request.arg2 = params.arg2.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127474,7 +127381,7 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu } request.arg1 = params.arg1.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127719,7 +127626,7 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc request.arg5 = static_cast>(params.arg5.unsignedCharValue); request.arg6 = params.arg6.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127760,7 +127667,7 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127803,7 +127710,7 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest request.arg1.c.g = params.arg1.c.g.floatValue; request.arg1.c.h = params.arg1.c.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127867,7 +127774,7 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -127922,7 +127829,7 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128062,7 +127969,7 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128228,7 +128135,7 @@ - (void)testListNestedStructListArgumentRequestWithParams: } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128284,7 +128191,7 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128319,7 +128226,7 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams request.arg1 = static_cast>(params.arg1.unsignedShortValue); request.arg2 = static_cast>(params.arg2.unsignedCharValue); - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128364,7 +128271,7 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128569,7 +128476,7 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128611,7 +128518,7 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho request.arg1.g = params.arg1.g.floatValue; request.arg1.h = params.arg1.h.doubleValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128654,7 +128561,7 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar timedInvokeTimeoutMs.SetValue(10000); } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128696,7 +128603,7 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi } } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128733,7 +128640,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve request.arg2 = static_cast>(params.arg2.unsignedCharValue); request.arg3 = params.arg3.boolValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128771,7 +128678,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve } request.arg1 = params.arg1.unsignedCharValue; - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self.endpoint, timedInvokeTimeoutMs, invokeTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128782,7 +128689,7 @@ - (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128816,7 +128723,7 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128828,7 +128735,7 @@ - (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::Boolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -128862,7 +128769,7 @@ - (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128896,7 +128803,7 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128908,7 +128815,7 @@ - (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::Bitmap8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -128942,7 +128849,7 @@ - (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -128976,7 +128883,7 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -128988,7 +128895,7 @@ - (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129022,7 +128929,7 @@ - (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129056,7 +128963,7 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedIntValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129068,7 +128975,7 @@ - (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap32::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129102,7 +129009,7 @@ - (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129136,7 +129043,7 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedLongLongValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129148,7 +129055,7 @@ - (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::Bitmap64::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129182,7 +129089,7 @@ - (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129216,7 +129123,7 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129228,7 +129135,7 @@ - (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129262,7 +129169,7 @@ - (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129296,7 +129203,7 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129308,7 +129215,7 @@ - (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129342,7 +129249,7 @@ - (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129376,7 +129283,7 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129388,7 +129295,7 @@ - (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int24u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129422,7 +129329,7 @@ - (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129456,7 +129363,7 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129468,7 +129375,7 @@ - (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int32u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129502,7 +129409,7 @@ - (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129536,7 +129443,7 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129548,7 +129455,7 @@ - (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int40u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129582,7 +129489,7 @@ - (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129616,7 +129523,7 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129628,7 +129535,7 @@ - (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int48u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129662,7 +129569,7 @@ - (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129696,7 +129603,7 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129708,7 +129615,7 @@ - (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int56u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129742,7 +129649,7 @@ - (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129776,7 +129683,7 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129788,7 +129695,7 @@ - (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int64u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129822,7 +129729,7 @@ - (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129856,7 +129763,7 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129868,7 +129775,7 @@ - (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129902,7 +129809,7 @@ - (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -129936,7 +129843,7 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -129948,7 +129855,7 @@ - (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -129982,7 +129889,7 @@ - (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130016,7 +129923,7 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130028,7 +129935,7 @@ - (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int24s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130062,7 +129969,7 @@ - (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130096,7 +130003,7 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.intValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130108,7 +130015,7 @@ - (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int32s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130142,7 +130049,7 @@ - (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130176,7 +130083,7 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130188,7 +130095,7 @@ - (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int40s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130222,7 +130129,7 @@ - (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130256,7 +130163,7 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130268,7 +130175,7 @@ - (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int48s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130302,7 +130209,7 @@ - (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130336,7 +130243,7 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130348,7 +130255,7 @@ - (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int56s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130382,7 +130289,7 @@ - (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130416,7 +130323,7 @@ - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.longLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130428,7 +130335,7 @@ - (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Int64s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130462,7 +130369,7 @@ - (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130496,7 +130403,7 @@ - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130508,7 +130415,7 @@ - (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Enum8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130542,7 +130449,7 @@ - (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130576,7 +130483,7 @@ - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130588,7 +130495,7 @@ - (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::Enum16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130622,7 +130529,7 @@ - (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130656,7 +130563,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.floatValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130668,7 +130575,7 @@ - (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::FloatSingle::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130702,7 +130609,7 @@ - (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130736,7 +130643,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130748,7 +130655,7 @@ - (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::FloatDouble::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130782,7 +130689,7 @@ - (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable valu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130816,7 +130723,7 @@ - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asByteSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130828,7 +130735,7 @@ - (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::OctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130862,7 +130769,7 @@ - (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -130917,7 +130824,7 @@ - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -130929,7 +130836,7 @@ - (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitTesting::Attributes::ListInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -130963,7 +130870,7 @@ - (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131018,7 +130925,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131030,7 +130937,7 @@ - (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::ListOctetString::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131064,7 +130971,7 @@ - (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131120,7 +131027,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131133,7 +131040,7 @@ - (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::ListStructOctetString::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131168,7 +131075,7 @@ - (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131202,7 +131109,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asByteSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131214,7 +131121,7 @@ - (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::LongOctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131248,7 +131155,7 @@ - (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131282,7 +131189,7 @@ - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131294,7 +131201,7 @@ - (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::CharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131328,7 +131235,7 @@ - (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131362,7 +131269,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value TypeInfo::Type cppValue; cppValue = [self asCharSpan:value]; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131374,7 +131281,7 @@ - (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::LongCharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131408,7 +131315,7 @@ - (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131442,7 +131349,7 @@ - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131454,7 +131361,7 @@ - (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)param { using TypeInfo = UnitTesting::Attributes::EpochUs::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131488,7 +131395,7 @@ - (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131522,7 +131429,7 @@ - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131534,7 +131441,7 @@ - (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params { using TypeInfo = UnitTesting::Attributes::EpochS::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131568,7 +131475,7 @@ - (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131602,7 +131509,7 @@ - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedShortValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131614,7 +131521,7 @@ - (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::VendorId::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131650,7 +131557,7 @@ - (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSA using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131877,7 +131784,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnu } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131891,7 +131798,7 @@ - (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscrib { using TypeInfo = UnitTesting::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -131927,7 +131834,7 @@ - (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -131961,7 +131868,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -131973,7 +131880,7 @@ - (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)para { using TypeInfo = UnitTesting::Attributes::EnumAttr::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132009,7 +131916,7 @@ - (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSim using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value @@ -132051,7 +131958,7 @@ - (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _ cppValue.g = value.g.floatValue; cppValue.h = value.h.doubleValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132064,7 +131971,7 @@ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::StructAttr::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132099,7 +132006,7 @@ - (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132133,7 +132040,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132146,7 +132053,7 @@ - (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132181,7 +132088,7 @@ - (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nu 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132215,7 +132122,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.charValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132228,7 +132135,7 @@ - (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132263,7 +132170,7 @@ - (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132297,7 +132204,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132310,7 +132217,7 @@ - (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132345,7 +132252,7 @@ - (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _N 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132379,7 +132286,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.shortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132392,7 +132299,7 @@ - (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * { using TypeInfo = UnitTesting::Attributes::RangeRestrictedInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132427,7 +132334,7 @@ - (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132482,7 +132389,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132495,7 +132402,7 @@ - (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::ListLongOctetString::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132531,7 +132438,7 @@ - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)param params = [params copy]; using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132642,7 +132549,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value } } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132654,7 +132561,7 @@ - (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::ListFabricScoped::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132689,7 +132596,7 @@ - (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132723,7 +132630,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132735,7 +132642,7 @@ - (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Non { using TypeInfo = UnitTesting::Attributes::TimedWriteBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132770,7 +132677,7 @@ - (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132804,7 +132711,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132817,7 +132724,7 @@ - (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::GeneralErrorBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132852,7 +132759,7 @@ - (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132886,7 +132793,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132899,7 +132806,7 @@ - (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::ClusterErrorBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -132934,7 +132841,7 @@ - (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable va 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -132968,7 +132875,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.boolValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -132980,7 +132887,7 @@ - (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)p { using TypeInfo = UnitTesting::Attributes::Unsupported::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133014,7 +132921,7 @@ - (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133053,7 +132960,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.boolValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133065,7 +132972,7 @@ - (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133100,7 +133007,7 @@ - (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133139,7 +133046,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133151,7 +133058,7 @@ - (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::NullableBitmap8::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133186,7 +133093,7 @@ - (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133225,7 +133132,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedShortValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133237,7 +133144,7 @@ - (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap16::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133272,7 +133179,7 @@ - (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133311,7 +133218,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedIntValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133323,7 +133230,7 @@ - (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap32::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133358,7 +133265,7 @@ - (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133397,7 +133304,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedLongLongValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133409,7 +133316,7 @@ - (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableBitmap64::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133444,7 +133351,7 @@ - (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133483,7 +133390,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133495,7 +133402,7 @@ - (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133529,7 +133436,7 @@ - (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133568,7 +133475,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133580,7 +133487,7 @@ - (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133614,7 +133521,7 @@ - (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133653,7 +133560,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133665,7 +133572,7 @@ - (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt24u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133699,7 +133606,7 @@ - (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133738,7 +133645,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedIntValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133750,7 +133657,7 @@ - (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt32u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133784,7 +133691,7 @@ - (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133823,7 +133730,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133835,7 +133742,7 @@ - (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt40u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133869,7 +133776,7 @@ - (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133908,7 +133815,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -133920,7 +133827,7 @@ - (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt48u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -133954,7 +133861,7 @@ - (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -133993,7 +133900,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134005,7 +133912,7 @@ - (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt56u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134039,7 +133946,7 @@ - (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134078,7 +133985,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedLongLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134090,7 +133997,7 @@ - (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt64u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134124,7 +134031,7 @@ - (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134163,7 +134070,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134175,7 +134082,7 @@ - (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134209,7 +134116,7 @@ - (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134248,7 +134155,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134260,7 +134167,7 @@ - (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134294,7 +134201,7 @@ - (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134333,7 +134240,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134345,7 +134252,7 @@ - (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt24s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134379,7 +134286,7 @@ - (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134418,7 +134325,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.intValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134430,7 +134337,7 @@ - (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt32s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134464,7 +134371,7 @@ - (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134503,7 +134410,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134515,7 +134422,7 @@ - (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt40s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134549,7 +134456,7 @@ - (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134588,7 +134495,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134600,7 +134507,7 @@ - (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt48s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134634,7 +134541,7 @@ - (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134673,7 +134580,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134685,7 +134592,7 @@ - (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt56s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134719,7 +134626,7 @@ - (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134758,7 +134665,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.longLongValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134770,7 +134677,7 @@ - (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableInt64s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134804,7 +134711,7 @@ - (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134843,7 +134750,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134855,7 +134762,7 @@ - (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::NullableEnum8::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134889,7 +134796,7 @@ - (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -134928,7 +134835,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -134940,7 +134847,7 @@ - (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableEnum16::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -134974,7 +134881,7 @@ - (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135013,7 +134920,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.floatValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135026,7 +134933,7 @@ - (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableFloatSingle::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135061,7 +134968,7 @@ - (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135100,7 +135007,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value nonNullValue_0 = value.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135113,7 +135020,7 @@ - (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableFloatDouble::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135148,7 +135055,7 @@ - (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nulla 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135187,7 +135094,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value nonNullValue_0 = [self asByteSpan:value]; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135199,7 +135106,7 @@ - (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::NullableOctetString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135234,7 +135141,7 @@ - (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135273,7 +135180,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value nonNullValue_0 = [self asCharSpan:value]; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135286,7 +135193,7 @@ - (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _No { using TypeInfo = UnitTesting::Attributes::NullableCharString::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135321,7 +135228,7 @@ - (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullab 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135360,7 +135267,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value nonNullValue_0 = static_cast>(value.unsignedCharValue); } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135372,7 +135279,7 @@ - (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonn { using TypeInfo = UnitTesting::Attributes::NullableEnumAttr::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135409,7 +135316,7 @@ - (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingCluste using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value @@ -135458,7 +135365,7 @@ - (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct nonNullValue_0.h = value.h.doubleValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135471,7 +135378,7 @@ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::NullableStruct::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135507,7 +135414,7 @@ - (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135546,7 +135453,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.unsignedCharValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135560,7 +135467,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribePa { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135596,7 +135503,7 @@ - (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumb 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135635,7 +135542,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullabl nonNullValue_0 = value.charValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135649,7 +135556,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribePa { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt8s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135685,7 +135592,7 @@ - (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135724,7 +135631,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullab nonNullValue_0 = value.unsignedShortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135738,7 +135645,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeP { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135774,7 +135681,7 @@ - (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNum 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion @@ -135813,7 +135720,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullab nonNullValue_0 = value.shortValue; } - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135827,7 +135734,7 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeP { using TypeInfo = UnitTesting::Attributes::NullableRangeRestrictedInt16s::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135862,7 +135769,7 @@ - (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -135896,7 +135803,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); @@ -135908,7 +135815,7 @@ - (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams * _Nonnul { using TypeInfo = UnitTesting::Attributes::WriteOnlyInt8u::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135942,7 +135849,7 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -135952,7 +135859,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ { using TypeInfo = UnitTesting::Attributes::GeneratedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -135987,7 +135894,7 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -135997,7 +135904,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N { using TypeInfo = UnitTesting::Attributes::AcceptedCommandList::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::DecodableType>(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136032,7 +135939,7 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136041,7 +135948,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par { using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136075,7 +135982,7 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136084,7 +135991,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull { using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136118,7 +136025,7 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136127,7 +136034,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa { using TypeInfo = UnitTesting::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -136161,7 +136068,7 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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()); + params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params @@ -136170,7 +136077,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu { using TypeInfo = UnitTesting::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index 397bbfb5a97891..9d33718463d50f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -22,465 +22,372 @@ @interface MTRBaseClusterIdentify () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGroups () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterScenes () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOnOff () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOnOffSwitchConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLevelControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBinaryInputBasic () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPulseWidthModulation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDescriptor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBinding () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAccessControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterActions () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBasicInformation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOTASoftwareUpdateProvider () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOTASoftwareUpdateRequestor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLocalizationConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTimeFormatLocalization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUnitLocalization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPowerSourceConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPowerSource () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGeneralCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterNetworkCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDiagnosticLogs () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGeneralDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSoftwareDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThreadNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWiFiNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterEthernetNetworkDiagnostics () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTimeSynchronization () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBridgedDeviceBasicInformation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSwitch () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAdministratorCommissioning () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOperationalCredentials () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterGroupKeyManagement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFixedLabel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUserLabel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBooleanState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterICDManagement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterModeSelect () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLaundryWasherMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLaundryWasherControls () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCRunMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCCleanMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTemperatureControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRefrigeratorAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDishwasherMode () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAirQuality () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterSmokeCOAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDishwasherAlarm () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOperationalState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRVCOperationalState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterHEPAFilterMonitoring () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterActivatedCarbonFilterMonitoring () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterDoorLock () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWindowCovering () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBarrierControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPumpConfigurationAndControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThermostat () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFanControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterThermostatUserInterfaceConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterColorControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterBallastConfiguration () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterIlluminanceMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTemperatureMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPressureMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFlowMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRelativeHumidityMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOccupancySensing () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterCarbonMonoxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterCarbonDioxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterNitrogenDioxideConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterOzoneConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM25ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterFormaldehydeConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM1ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterPM10ConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterRadonConcentrationMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterWakeOnLAN () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterChannel () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterTargetNavigator () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterMediaPlayback () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterMediaInput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterLowPower () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterKeypadInput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterContentLauncher () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAudioOutput () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterApplicationLauncher () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterApplicationBasic () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterAccountLogin () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterElectricalMeasurement () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end @interface MTRBaseClusterUnitTesting () @property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f433d153adcafb..54316e5bba43da 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -16,6 +16,7 @@ */ #import +#import #import "MTRAsyncCallbackWorkQueue.h" #import "MTRBaseClusterUtils.h" @@ -65,12 +66,11 @@ @implementation MTRClusterIdentify - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -82,53 +82,25 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandIdentifyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Identify::Commands::Identify::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.identifyTime = params.identifyTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster identifyWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -150,56 +122,25 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeIdentifyID, (unsigned int) MTRCommandIDTypeClusterIdentifyCommandTriggerEffectID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Identify::Commands::TriggerEffect::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.effectIdentifier = static_cast>( - params.effectIdentifier.unsignedCharValue); - request.effectVariant - = static_cast>(params.effectVariant.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster triggerEffectWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -217,7 +158,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - (NSDictionary *)readAttributeIdentifyTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) params:params]; @@ -234,7 +175,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTimeID) value:dataValueDictionary @@ -244,7 +185,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeIdentifyTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID) params:params]; @@ -252,7 +193,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID) params:params]; @@ -260,7 +201,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID) params:params]; @@ -268,7 +209,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) params:params]; @@ -276,7 +217,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID) params:params]; @@ -284,7 +225,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID) params:params]; @@ -292,7 +233,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID) params:params]; @@ -333,12 +274,11 @@ @implementation MTRClusterGroups - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -350,54 +290,25 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterAddGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, GroupsClusterAddGroupResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::AddGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -420,53 +331,25 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandViewGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterViewGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterViewGroupResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::ViewGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -489,75 +372,26 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandGetGroupMembershipID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterGetGroupMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::GetGroupMembership::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupList.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupList.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.groupList.count; ++i_0) { - if (![params.groupList[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.groupList[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupList = ListType_0(listHolder_0->mList, params.groupList.count); - } else { - request.groupList = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getGroupMembershipWithParams:params + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -580,54 +414,25 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveGroupID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupsClusterRemoveGroupResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupsClusterRemoveGroupResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::RemoveGroup::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeGroupWithParams:params + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -658,52 +463,25 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandRemoveAllGroupsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::RemoveAllGroups::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeAllGroupsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -725,54 +503,25 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupsID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupsID, (unsigned int) MTRCommandIDTypeClusterGroupsCommandAddGroupIfIdentifyingID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Groups::Commands::AddGroupIfIdentifying::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addGroupIfIdentifyingWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -790,7 +539,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeNameSupportID) params:params]; @@ -798,7 +547,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID) params:params]; @@ -806,7 +555,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID) params:params]; @@ -814,7 +563,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) params:params]; @@ -822,7 +571,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAttributeListID) params:params]; @@ -830,7 +579,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID) params:params]; @@ -838,7 +587,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID) params:params]; @@ -945,12 +694,11 @@ @implementation MTRClusterScenes - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -962,103 +710,25 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterAddSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, ScenesClusterAddSceneResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::AddScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.sceneName = [self asCharSpan:params.sceneName]; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { - if (![params.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] - isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList - = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); - } else { - request.extensionFieldSets = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addSceneWithParams:params + completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1081,54 +751,25 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterViewSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::ViewScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster viewSceneWithParams:params + completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1151,55 +792,25 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterRemoveSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterRemoveSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RemoveScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeSceneWithParams:params + completion:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1222,54 +833,26 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRemoveAllScenesID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterRemoveAllScenesResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterRemoveAllScenesResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RemoveAllScenes::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeAllScenesWithParams:params + completion:^( + MTRScenesClusterRemoveAllScenesResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1292,54 +875,25 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandStoreSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterStoreSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterStoreSceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::StoreScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster storeSceneWithParams:params + completion:^(MTRScenesClusterStoreSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1361,63 +915,25 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandRecallSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::RecallScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - if (params.transitionTime != nil) { - auto & definedValue_0 = request.transitionTime.Emplace(); - if (params.transitionTime == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.transitionTime.unsignedShortValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster recallSceneWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1440,54 +956,26 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandGetSceneMembershipID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterGetSceneMembershipResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterGetSceneMembershipResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::GetSceneMembership::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getSceneMembershipWithParams:params + completion:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1510,104 +998,26 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterEnhancedAddSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::EnhancedAddScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.sceneName = [self asCharSpan:params.sceneName]; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { - if (![params.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] - isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList - = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); - } else { - request.extensionFieldSets = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedAddSceneWithParams:params + completion:^( + MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1630,55 +1040,26 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterEnhancedViewSceneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::EnhancedViewScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupID = params.groupID.unsignedShortValue; - request.sceneID = params.sceneID.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedViewSceneWithParams:params + completion:^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1701,57 +1082,25 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeScenesID, (unsigned int) MTRCommandIDTypeClusterScenesCommandCopySceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRScenesClusterCopySceneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ScenesClusterCopySceneResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Scenes::Commands::CopyScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.groupIdentifierFrom = params.groupIdentifierFrom.unsignedShortValue; - request.sceneIdentifierFrom = params.sceneIdentifierFrom.unsignedCharValue; - request.groupIdentifierTo = params.groupIdentifierTo.unsignedShortValue; - request.sceneIdentifierTo = params.sceneIdentifierTo.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster copySceneWithParams:params + completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -1769,7 +1118,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneCountID) params:params]; @@ -1777,7 +1126,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID) params:params]; @@ -1785,7 +1134,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID) params:params]; @@ -1793,7 +1142,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneValidID) params:params]; @@ -1801,7 +1150,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeNameSupportID) params:params]; @@ -1809,7 +1158,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID) params:params]; @@ -1817,7 +1166,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) params:params]; @@ -1825,7 +1174,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID) params:params]; @@ -1833,7 +1182,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID) params:params]; @@ -1841,7 +1190,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID) params:params]; @@ -1849,7 +1198,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeEventListID) params:params]; @@ -1857,7 +1206,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAttributeListID) params:params]; @@ -1865,7 +1214,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFeatureMapID) params:params]; @@ -1873,7 +1222,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID) params:params]; @@ -2032,12 +1381,11 @@ @implementation MTRClusterOnOff - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2055,52 +1403,25 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::Off::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster offWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2128,52 +1449,25 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::On::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2201,52 +1495,25 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandToggleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::Toggle::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster toggleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2268,55 +1535,25 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOffWithEffectID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OffWithEffect::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.effectIdentifier = static_cast>( - params.effectIdentifier.unsignedCharValue); - request.effectVariant = params.effectVariant.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster offWithEffectWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2347,52 +1584,25 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOnOffID, + self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithRecallGlobalSceneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OnWithRecallGlobalScene::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithRecallGlobalSceneWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2414,56 +1624,25 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOnOffID, (unsigned int) MTRCommandIDTypeClusterOnOffCommandOnWithTimedOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OnOff::Commands::OnWithTimedOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.onOffControl - = static_cast>(params.onOffControl.unsignedCharValue); - request.onTime = params.onTime.unsignedShortValue; - request.offWaitTime = params.offWaitTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster onWithTimedOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2481,7 +1660,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) params:params]; @@ -2489,7 +1668,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeGlobalSceneControlWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) params:params]; @@ -2497,7 +1676,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - (NSDictionary *)readAttributeOnTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) params:params]; @@ -2514,7 +1693,7 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) value:dataValueDictionary @@ -2524,7 +1703,7 @@ - (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeOffWaitTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) params:params]; @@ -2541,7 +1720,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary @@ -2551,7 +1730,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStartUpOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) params:params]; @@ -2568,7 +1747,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary @@ -2578,7 +1757,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) params:params]; @@ -2586,7 +1765,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; @@ -2594,7 +1773,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; @@ -2602,7 +1781,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; @@ -2610,7 +1789,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) params:params]; @@ -2618,7 +1797,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) params:params]; @@ -2735,12 +1914,11 @@ @implementation MTRClusterOnOffSwitchConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2748,7 +1926,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; @@ -2756,7 +1934,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; @@ -2773,7 +1951,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary @@ -2784,7 +1962,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; @@ -2793,7 +1971,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; @@ -2801,7 +1979,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; @@ -2809,7 +1987,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; @@ -2817,7 +1995,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; @@ -2825,7 +2003,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; @@ -2846,12 +2024,11 @@ @implementation MTRClusterLevelControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -2863,63 +2040,25 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToLevel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.level = params.level.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToLevelWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -2941,64 +2080,25 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Move::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - if (params.rate == nil) { - request.rate.SetNull(); - } else { - auto & nonNullValue_0 = request.rate.SetNonNull(); - nonNullValue_0 = params.rate.unsignedCharValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3020,65 +2120,25 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Step::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3100,56 +2160,25 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3171,63 +2200,25 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToLevelWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToLevelWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.level = params.level.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToLevelWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3249,64 +2240,25 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - if (params.rate == nil) { - request.rate.SetNull(); - } else { - auto & nonNullValue_0 = request.rate.SetNonNull(); - nonNullValue_0 = params.rate.unsignedCharValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3328,65 +2280,25 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStepWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::StepWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - if (params.transitionTime == nil) { - request.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = request.transitionTime.SetNonNull(); - nonNullValue_0 = params.transitionTime.unsignedShortValue; - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3408,56 +2320,25 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandStopWithOnOffID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::StopWithOnOff::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask - = static_cast>(params.optionsMask.unsignedCharValue); - request.optionsOverride = static_cast>( - params.optionsOverride.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3479,53 +2360,25 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeLevelControlID, (unsigned int) MTRCommandIDTypeClusterLevelControlCommandMoveToClosestFrequencyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LevelControl::Commands::MoveToClosestFrequency::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.frequency = params.frequency.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToClosestFrequencyWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -3543,7 +2396,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) params:params]; @@ -3551,7 +2404,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) params:params]; @@ -3559,7 +2412,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) params:params]; @@ -3567,7 +2420,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) params:params]; @@ -3575,7 +2428,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeCurrentFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) params:params]; @@ -3583,7 +2436,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMinFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) params:params]; @@ -3591,7 +2444,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeMaxFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) params:params]; @@ -3599,7 +2452,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) params:params]; @@ -3616,7 +2469,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) value:dataValueDictionary @@ -3626,7 +2479,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; @@ -3643,7 +2496,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary @@ -3653,7 +2506,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary - (NSDictionary *)readAttributeOnLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) params:params]; @@ -3670,7 +2523,7 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) value:dataValueDictionary @@ -3680,7 +2533,7 @@ - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeOnTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) params:params]; @@ -3697,7 +2550,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnTransitionTimeID) value:dataValueDictionary @@ -3707,7 +2560,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) params:params]; @@ -3724,7 +2577,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOffTransitionTimeID) value:dataValueDictionary @@ -3734,7 +2587,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSDictionary * - (NSDictionary *)readAttributeDefaultMoveRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) params:params]; @@ -3751,7 +2604,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeDefaultMoveRateID) value:dataValueDictionary @@ -3761,7 +2614,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeStartUpCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) params:params]; @@ -3778,7 +2631,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID) value:dataValueDictionary @@ -3788,7 +2641,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID) params:params]; @@ -3796,7 +2649,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID) params:params]; @@ -3804,7 +2657,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) params:params]; @@ -3812,7 +2665,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID) params:params]; @@ -3820,7 +2673,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID) params:params]; @@ -3828,7 +2681,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID) params:params]; @@ -3939,12 +2792,11 @@ @implementation MTRClusterBinaryInputBasic - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -3952,7 +2804,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) params:params]; @@ -3969,7 +2821,7 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary @@ -3979,7 +2831,7 @@ - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) params:params]; @@ -3996,7 +2848,7 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary @@ -4006,7 +2858,7 @@ - (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) params:params]; @@ -4023,7 +2875,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary @@ -4033,7 +2885,7 @@ - (void)writeAttributeInactiveTextWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; @@ -4050,7 +2902,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary @@ -4060,7 +2912,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data - (NSDictionary *)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) params:params]; @@ -4068,7 +2920,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)data - (NSDictionary *)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) params:params]; @@ -4085,7 +2937,7 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary @@ -4095,7 +2947,7 @@ - (void)writeAttributePresentValueWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) params:params]; @@ -4112,7 +2964,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary @@ -4122,7 +2974,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; @@ -4130,7 +2982,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; @@ -4138,7 +2990,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; @@ -4146,7 +2998,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; @@ -4154,7 +3006,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) params:params]; @@ -4162,7 +3014,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) params:params]; @@ -4170,7 +3022,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) params:params]; @@ -4178,7 +3030,7 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; @@ -4199,12 +3051,11 @@ @implementation MTRClusterPulseWidthModulation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4212,7 +3063,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID) params:params]; @@ -4220,7 +3071,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID) params:params]; @@ -4228,7 +3079,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID) params:params]; @@ -4236,7 +3087,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID) params:params]; @@ -4244,7 +3095,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID) params:params]; @@ -4252,7 +3103,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID) params:params]; @@ -4264,12 +3115,11 @@ @implementation MTRClusterDescriptor - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4277,7 +3127,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeDeviceTypeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID) params:params]; @@ -4285,7 +3135,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeServerListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID) params:params]; @@ -4293,7 +3143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClientListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClientListID) params:params]; @@ -4301,7 +3151,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePartsListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID) params:params]; @@ -4309,7 +3159,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTagListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeTagListID) params:params]; @@ -4317,7 +3167,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID) params:params]; @@ -4325,7 +3175,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID) params:params]; @@ -4333,7 +3183,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) params:params]; @@ -4341,7 +3191,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID) params:params]; @@ -4349,7 +3199,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID) params:params]; @@ -4357,7 +3207,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID) params:params]; @@ -4382,12 +3232,11 @@ @implementation MTRClusterBinding - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4395,7 +3244,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) params:params]; @@ -4412,7 +3261,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeBindingID) value:dataValueDictionary @@ -4422,7 +3271,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID) params:params]; @@ -4430,7 +3279,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID) params:params]; @@ -4438,7 +3287,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) params:params]; @@ -4446,7 +3295,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAttributeListID) params:params]; @@ -4454,7 +3303,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeFeatureMapID) params:params]; @@ -4462,7 +3311,7 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID) params:params]; @@ -4483,12 +3332,11 @@ @implementation MTRClusterAccessControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4496,7 +3344,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeACLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) params:params]; @@ -4513,7 +3361,7 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeACLID) value:dataValueDictionary @@ -4523,7 +3371,7 @@ - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDict - (NSDictionary *)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) params:params]; @@ -4540,7 +3388,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeExtensionID) value:dataValueDictionary @@ -4551,7 +3399,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSubjectsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeSubjectsPerAccessControlEntryID) params:params]; @@ -4559,7 +3407,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeTargetsPerAccessControlEntryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeTargetsPerAccessControlEntryID) params:params]; @@ -4568,7 +3416,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAccessControlEntriesPerFabricWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAccessControlEntriesPerFabricID) params:params]; @@ -4576,7 +3424,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID) params:params]; @@ -4584,7 +3432,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID) params:params]; @@ -4592,7 +3440,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) params:params]; @@ -4600,7 +3448,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID) params:params]; @@ -4608,7 +3456,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID) params:params]; @@ -4616,7 +3464,7 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID) params:params]; @@ -4652,12 +3500,11 @@ @implementation MTRClusterActions - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -4669,57 +3516,25 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::InstantAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster instantActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4741,58 +3556,25 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandInstantActionWithTransitionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::InstantActionWithTransition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.transitionTime = params.transitionTime.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster instantActionWithTransitionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4814,57 +3596,25 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StartAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4886,58 +3636,25 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStartActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StartActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -4959,57 +3676,25 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandStopActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::StopAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5031,57 +3716,25 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::PauseAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5103,58 +3756,25 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandPauseActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::PauseActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5176,57 +3796,25 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandResumeActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::ResumeAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5248,57 +3836,25 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::EnableAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enableActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5320,58 +3876,25 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandEnableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::EnableActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enableActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5393,57 +3916,25 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::DisableAction::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster disableActionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5465,58 +3956,25 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActionsID, + self.endpoint, (unsigned int) MTRClusterIDTypeActionsID, (unsigned int) MTRCommandIDTypeClusterActionsCommandDisableActionWithDurationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Actions::Commands::DisableActionWithDuration::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActions alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster disableActionWithDurationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5534,7 +3992,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeActionListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeActionListID) params:params]; @@ -5542,7 +4000,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeEndpointListsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEndpointListsID) params:params]; @@ -5550,7 +4008,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeSetupURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeSetupURLID) params:params]; @@ -5558,7 +4016,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID) params:params]; @@ -5566,7 +4024,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID) params:params]; @@ -5574,7 +4032,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) params:params]; @@ -5582,7 +4040,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAttributeListID) params:params]; @@ -5590,7 +4048,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeFeatureMapID) params:params]; @@ -5598,7 +4056,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID) params:params]; @@ -5739,12 +4197,11 @@ @implementation MTRClusterBasicInformation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -5765,51 +4222,24 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) 0x00000028, (unsigned int) 0x10020000]; + self.endpoint, (unsigned int) 0x00000028, (unsigned int) 0x10020000]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BasicInformation::Commands::MfgSpecificPing::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster mfgSpecificPingWithParams:params + completionHandler:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -5827,7 +4257,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeDataModelRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeDataModelRevisionID) params:params]; @@ -5835,7 +4265,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorNameID) params:params]; @@ -5843,7 +4273,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeVendorIDID) params:params]; @@ -5851,7 +4281,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductNameID) params:params]; @@ -5859,7 +4289,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductIDID) params:params]; @@ -5867,7 +4297,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) params:params]; @@ -5884,7 +4314,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeNodeLabelID) value:dataValueDictionary @@ -5894,7 +4324,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeLocationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) params:params]; @@ -5911,7 +4341,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocationID) value:dataValueDictionary @@ -5921,7 +4351,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionID) params:params]; @@ -5929,7 +4359,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeHardwareVersionStringID) params:params]; @@ -5937,7 +4367,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionID) params:params]; @@ -5945,7 +4375,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSoftwareVersionStringID) params:params]; @@ -5953,7 +4383,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeManufacturingDateID) params:params]; @@ -5961,7 +4391,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributePartNumberID) params:params]; @@ -5969,7 +4399,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductURLID) params:params]; @@ -5977,7 +4407,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductLabelID) params:params]; @@ -5985,7 +4415,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSerialNumberID) params:params]; @@ -5993,7 +4423,7 @@ - (void)writeAttributeLocationWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLocalConfigDisabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) params:params]; @@ -6010,7 +4440,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeLocalConfigDisabledID) value:dataValueDictionary @@ -6020,7 +4450,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeReachableID) params:params]; @@ -6028,7 +4458,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeUniqueIDID) params:params]; @@ -6036,7 +4466,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeCapabilityMinimaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID) params:params]; @@ -6044,7 +4474,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) params:params]; @@ -6052,7 +4482,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -6060,7 +4490,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID) params:params]; @@ -6068,7 +4498,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) params:params]; @@ -6076,7 +4506,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID) params:params]; @@ -6084,7 +4514,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeFeatureMapID) params:params]; @@ -6092,7 +4522,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeClusterRevisionID) params:params]; @@ -6134,12 +4564,11 @@ @implementation MTRClusterOTASoftwareUpdateProvider - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6152,96 +4581,26 @@ - (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParam NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandQueryImageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROTASoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OTASoftwareUpdateProviderClusterQueryImageResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.vendorID - = static_cast>(params.vendorID.unsignedShortValue); - request.productID = params.productID.unsignedShortValue; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.protocolsSupported.count != 0) { - auto * listHolder_0 = new ListHolder(params.protocolsSupported.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.protocolsSupported.count; ++i_0) { - if (![params.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.protocolsSupported[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - element_0.unsignedCharValue); - } - request.protocolsSupported = ListType_0(listHolder_0->mList, params.protocolsSupported.count); - } else { - request.protocolsSupported = ListType_0(); - } - } - if (params.hardwareVersion != nil) { - auto & definedValue_0 = request.hardwareVersion.Emplace(); - definedValue_0 = params.hardwareVersion.unsignedShortValue; - } - if (params.location != nil) { - auto & definedValue_0 = request.location.Emplace(); - definedValue_0 = [self asCharSpan:params.location]; - } - if (params.requestorCanConsent != nil) { - auto & definedValue_0 = request.requestorCanConsent.Emplace(); - definedValue_0 = params.requestorCanConsent.boolValue; - } - if (params.metadataForProvider != nil) { - auto & definedValue_0 = request.metadataForProvider.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForProvider]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster queryImageWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6264,55 +4623,26 @@ - (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUp NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandApplyUpdateRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OTASoftwareUpdateProviderClusterApplyUpdateResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.newVersion = params.newVersion.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster applyUpdateRequestWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6334,54 +4664,25 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateProviderID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateProviderCommandNotifyUpdateAppliedID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster notifyUpdateAppliedWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6400,7 +4701,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID) params:params]; @@ -6409,7 +4710,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID) params:params]; @@ -6417,7 +4718,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) params:params]; @@ -6425,7 +4726,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID) params:params]; @@ -6433,7 +4734,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID) params:params]; @@ -6441,7 +4742,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID) params:params]; @@ -6505,12 +4806,11 @@ @implementation MTRClusterOTASoftwareUpdateRequestor - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6522,62 +4822,25 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateRequestorID, + self.endpoint, (unsigned int) MTRClusterIDTypeOTASoftwareUpdateRequestorID, (unsigned int) MTRCommandIDTypeClusterOTASoftwareUpdateRequestorCommandAnnounceOTAProviderID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.providerNodeID = params.providerNodeID.unsignedLongLongValue; - request.vendorID - = static_cast>(params.vendorID.unsignedShortValue); - request.announcementReason = static_cast>( - params.announcementReason.unsignedCharValue); - if (params.metadataForNode != nil) { - auto & definedValue_0 = request.metadataForNode.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForNode]; - } - request.endpoint = params.endpoint.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster announceOTAProviderWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -6596,7 +4859,7 @@ - (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnou - (NSDictionary *)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) params:params]; @@ -6613,7 +4876,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) value:dataValueDictionary @@ -6623,7 +4886,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdatePossibleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdatePossibleID) params:params]; @@ -6631,7 +4894,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdateStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateID) params:params]; @@ -6640,7 +4903,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeUpdateStateProgressWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID) params:params]; @@ -6649,7 +4912,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID) params:params]; @@ -6658,7 +4921,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID) params:params]; @@ -6666,7 +4929,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) params:params]; @@ -6674,7 +4937,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID) params:params]; @@ -6682,7 +4945,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID) params:params]; @@ -6690,7 +4953,7 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID) params:params]; @@ -6740,12 +5003,11 @@ @implementation MTRClusterLocalizationConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6753,7 +5015,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) params:params]; @@ -6770,7 +5032,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeActiveLocaleID) value:dataValueDictionary @@ -6780,7 +5042,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSupportedLocalesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID) params:params]; @@ -6789,7 +5051,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID) params:params]; @@ -6798,7 +5060,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID) params:params]; @@ -6806,7 +5068,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) params:params]; @@ -6814,7 +5076,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID) params:params]; @@ -6822,7 +5084,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID) params:params]; @@ -6830,7 +5092,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID) params:params]; @@ -6851,12 +5113,11 @@ @implementation MTRClusterTimeFormatLocalization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -6864,7 +5125,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) params:params]; @@ -6881,7 +5142,7 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeHourFormatID) value:dataValueDictionary @@ -6891,7 +5152,7 @@ - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeActiveCalendarTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) params:params]; @@ -6908,7 +5169,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeActiveCalendarTypeID) value:dataValueDictionary @@ -6919,7 +5180,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeSupportedCalendarTypesWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID) params:params]; @@ -6928,7 +5189,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID) params:params]; @@ -6936,7 +5197,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID) params:params]; @@ -6944,7 +5205,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) params:params]; @@ -6952,7 +5213,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID) params:params]; @@ -6960,7 +5221,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID) params:params]; @@ -6968,7 +5229,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID) params:params]; @@ -6989,12 +5250,11 @@ @implementation MTRClusterUnitLocalization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7002,7 +5262,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) params:params]; @@ -7019,7 +5279,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID) value:dataValueDictionary @@ -7029,7 +5289,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID) params:params]; @@ -7037,7 +5297,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID) params:params]; @@ -7045,7 +5305,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) params:params]; @@ -7053,7 +5313,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID) params:params]; @@ -7061,7 +5321,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID) params:params]; @@ -7069,7 +5329,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID) params:params]; @@ -7090,12 +5350,11 @@ @implementation MTRClusterPowerSourceConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7103,7 +5362,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID) params:params]; @@ -7112,7 +5371,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID) params:params]; @@ -7121,7 +5380,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID) params:params]; @@ -7129,7 +5388,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) params:params]; @@ -7137,7 +5396,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID) params:params]; @@ -7145,7 +5404,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID) params:params]; @@ -7153,7 +5412,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID) params:params]; @@ -7174,12 +5433,11 @@ @implementation MTRClusterPowerSource - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7187,7 +5445,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeStatusID) params:params]; @@ -7195,7 +5453,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOrderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeOrderID) params:params]; @@ -7203,7 +5461,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeDescriptionID) params:params]; @@ -7211,7 +5469,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedInputVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputVoltageID) params:params]; @@ -7219,7 +5477,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedInputFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedInputFrequencyID) params:params]; @@ -7227,7 +5485,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredCurrentTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredCurrentTypeID) params:params]; @@ -7235,7 +5493,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredAssessedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredAssessedCurrentID) params:params]; @@ -7243,7 +5501,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredNominalVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredNominalVoltageID) params:params]; @@ -7251,7 +5509,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredMaximumCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredMaximumCurrentID) params:params]; @@ -7259,7 +5517,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeWiredPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeWiredPresentID) params:params]; @@ -7267,7 +5525,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveWiredFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveWiredFaultsID) params:params]; @@ -7275,7 +5533,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatVoltageID) params:params]; @@ -7283,7 +5541,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatPercentRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPercentRemainingID) params:params]; @@ -7291,7 +5549,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatTimeRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeRemainingID) params:params]; @@ -7299,7 +5557,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargeLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeLevelID) params:params]; @@ -7307,7 +5565,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplacementNeededWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementNeededID) params:params]; @@ -7315,7 +5573,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplaceabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplaceabilityID) params:params]; @@ -7323,7 +5581,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatPresentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatPresentID) params:params]; @@ -7331,7 +5589,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveBatFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatFaultsID) params:params]; @@ -7339,7 +5597,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatReplacementDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatReplacementDescriptionID) params:params]; @@ -7347,7 +5605,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatCommonDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCommonDesignationID) params:params]; @@ -7355,7 +5613,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatANSIDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatANSIDesignationID) params:params]; @@ -7363,7 +5621,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatIECDesignationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatIECDesignationID) params:params]; @@ -7371,7 +5629,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatApprovedChemistryWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatApprovedChemistryID) params:params]; @@ -7379,7 +5637,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatCapacityID) params:params]; @@ -7387,7 +5645,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatQuantityID) params:params]; @@ -7395,7 +5653,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargeStateID) params:params]; @@ -7403,7 +5661,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatTimeToFullChargeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatTimeToFullChargeID) params:params]; @@ -7411,7 +5669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatFunctionalWhileChargingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatFunctionalWhileChargingID) params:params]; @@ -7419,7 +5677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBatChargingCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeBatChargingCurrentID) params:params]; @@ -7427,7 +5685,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeActiveBatChargeFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeActiveBatChargeFaultsID) params:params]; @@ -7435,7 +5693,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEndpointListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID) params:params]; @@ -7443,7 +5701,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID) params:params]; @@ -7451,7 +5709,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID) params:params]; @@ -7459,7 +5717,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) params:params]; @@ -7467,7 +5725,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID) params:params]; @@ -7475,7 +5733,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID) params:params]; @@ -7483,7 +5741,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID) params:params]; @@ -7504,12 +5762,11 @@ @implementation MTRClusterGeneralCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7522,55 +5779,26 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandArmFailSafeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterArmFailSafeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::ArmFailSafe::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster armFailSafeWithParams:params + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7593,57 +5821,26 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandSetRegulatoryConfigID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newRegulatoryConfig = static_cast>( - params.newRegulatoryConfig.unsignedCharValue); - request.countryCode = [self asCharSpan:params.countryCode]; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setRegulatoryConfigWithParams:params + completion:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7679,54 +5876,27 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralCommissioningID, (unsigned int) MTRCommandIDTypeClusterGeneralCommissioningCommandCommissioningCompleteID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GeneralCommissioningClusterCommissioningCompleteResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralCommissioning::Commands::CommissioningComplete::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + commissioningCompleteWithParams:params + completion:^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -7744,7 +5914,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio - (NSDictionary *)readAttributeBreadcrumbWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) params:params]; @@ -7761,7 +5931,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBreadcrumbID) value:dataValueDictionary @@ -7772,7 +5942,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeBasicCommissioningInfoWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeBasicCommissioningInfoID) params:params]; @@ -7780,7 +5950,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeRegulatoryConfigWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeRegulatoryConfigID) params:params]; @@ -7788,7 +5958,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLocationCapabilityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeLocationCapabilityID) params:params]; @@ -7797,7 +5967,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeSupportsConcurrentConnectionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeSupportsConcurrentConnectionID) params:params]; @@ -7805,7 +5975,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID) params:params]; @@ -7813,7 +5983,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID) params:params]; @@ -7821,7 +5991,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) params:params]; @@ -7829,7 +5999,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID) params:params]; @@ -7837,7 +6007,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID) params:params]; @@ -7845,7 +6015,7 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID) params:params]; @@ -7926,12 +6096,11 @@ @implementation MTRClusterNetworkCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -7944,68 +6113,26 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandScanNetworksID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterScanNetworksResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ScanNetworks::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.ssid != nil) { - auto & definedValue_0 = request.ssid.Emplace(); - if (params.ssid == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.ssid]; - } - } - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster scanNetworksWithParams:params + completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8028,59 +6155,26 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateWiFiNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.ssid = [self asByteSpan:params.ssid]; - request.credentials = [self asByteSpan:params.credentials]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addOrUpdateWiFiNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8103,58 +6197,26 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandAddOrUpdateThreadNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.operationalDataset = [self asByteSpan:params.operationalDataset]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addOrUpdateThreadNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8177,58 +6239,26 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandRemoveNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::RemoveNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8251,58 +6281,26 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandConnectNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterConnectNetworkResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ConnectNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster connectNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8325,59 +6323,26 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeNetworkCommissioningID, (unsigned int) MTRCommandIDTypeClusterNetworkCommissioningCommandReorderNetworkID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - NetworkCommissioningClusterNetworkConfigResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - NetworkCommissioning::Commands::ReorderNetwork::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.networkID = [self asByteSpan:params.networkID]; - request.networkIndex = params.networkIndex.unsignedCharValue; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster reorderNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8395,7 +6360,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeMaxNetworksID) params:params]; @@ -8403,7 +6368,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeNetworksWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeNetworksID) params:params]; @@ -8411,7 +6376,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeScanMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeScanMaxTimeSecondsID) params:params]; @@ -8419,7 +6384,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeConnectMaxTimeSecondsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeConnectMaxTimeSecondsID) params:params]; @@ -8427,7 +6392,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa - (NSDictionary *)readAttributeInterfaceEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) params:params]; @@ -8444,7 +6409,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeInterfaceEnabledID) value:dataValueDictionary @@ -8454,7 +6419,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastNetworkingStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkingStatusID) params:params]; @@ -8462,7 +6427,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastNetworkIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastNetworkIDID) params:params]; @@ -8470,7 +6435,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLastConnectErrorValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeLastConnectErrorValueID) params:params]; @@ -8478,7 +6443,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID) params:params]; @@ -8486,7 +6451,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID) params:params]; @@ -8494,7 +6459,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) params:params]; @@ -8502,7 +6467,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID) params:params]; @@ -8510,7 +6475,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID) params:params]; @@ -8518,7 +6483,7 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID) params:params]; @@ -8633,12 +6598,11 @@ @implementation MTRClusterDiagnosticLogs - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -8651,60 +6615,26 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDiagnosticLogsID, + self.endpoint, (unsigned int) MTRClusterIDTypeDiagnosticLogsID, (unsigned int) MTRCommandIDTypeClusterDiagnosticLogsCommandRetrieveLogsRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DiagnosticLogsClusterRetrieveLogsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.intent = static_cast>(params.intent.unsignedCharValue); - request.requestedProtocol = static_cast>( - params.requestedProtocol.unsignedCharValue); - if (params.transferFileDesignator != nil) { - auto & definedValue_0 = request.transferFileDesignator.Emplace(); - definedValue_0 = [self asCharSpan:params.transferFileDesignator]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster retrieveLogsRequestWithParams:params + completion:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8722,7 +6652,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID) params:params]; @@ -8730,7 +6660,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID) params:params]; @@ -8738,7 +6668,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) params:params]; @@ -8746,7 +6676,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID) params:params]; @@ -8754,7 +6684,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID) params:params]; @@ -8762,7 +6692,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID) params:params]; @@ -8798,12 +6728,11 @@ @implementation MTRClusterGeneralDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -8815,54 +6744,25 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGeneralDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeGeneralDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterGeneralDiagnosticsCommandTestEventTriggerID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GeneralDiagnostics::Commands::TestEventTrigger::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enableKey = [self asByteSpan:params.enableKey]; - request.eventTrigger = params.eventTrigger.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEventTriggerWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -8880,7 +6780,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeNetworkInterfacesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeNetworkInterfacesID) params:params]; @@ -8888,7 +6788,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeRebootCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeRebootCountID) params:params]; @@ -8896,7 +6796,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeUpTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeUpTimeID) params:params]; @@ -8904,7 +6804,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeTotalOperationalHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTotalOperationalHoursID) params:params]; @@ -8912,7 +6812,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeBootReasonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeBootReasonID) params:params]; @@ -8920,7 +6820,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveHardwareFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID) params:params]; @@ -8928,7 +6828,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveRadioFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID) params:params]; @@ -8936,7 +6836,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeActiveNetworkFaultsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID) params:params]; @@ -8945,7 +6845,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeTestEventTriggersEnabledWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) params:params]; @@ -8953,7 +6853,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -8961,7 +6861,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -8969,7 +6869,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) params:params]; @@ -8977,7 +6877,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID) params:params]; @@ -8985,7 +6885,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID) params:params]; @@ -8993,7 +6893,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9028,12 +6928,11 @@ @implementation MTRClusterSoftwareDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9054,52 +6953,25 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeSoftwareDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeSoftwareDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterSoftwareDiagnosticsCommandResetWatermarksID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - SoftwareDiagnostics::Commands::ResetWatermarks::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetWatermarksWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -9117,7 +6989,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeThreadMetricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeThreadMetricsID) params:params]; @@ -9125,7 +6997,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapFreeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapFreeID) params:params]; @@ -9133,7 +7005,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapUsedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapUsedID) params:params]; @@ -9142,7 +7014,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeCurrentHeapHighWatermarkWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID) params:params]; @@ -9150,7 +7022,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -9158,7 +7030,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -9166,7 +7038,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) params:params]; @@ -9174,7 +7046,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID) params:params]; @@ -9182,7 +7054,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID) params:params]; @@ -9190,7 +7062,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9230,12 +7102,11 @@ @implementation MTRClusterThreadNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9256,52 +7127,25 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThreadNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeThreadNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterThreadNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -9319,7 +7163,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelID) params:params]; @@ -9327,7 +7171,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRoutingRoleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRoutingRoleID) params:params]; @@ -9335,7 +7179,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeNetworkNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNetworkNameID) params:params]; @@ -9343,7 +7187,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePanIdID) params:params]; @@ -9351,7 +7195,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeExtendedPanIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeExtendedPanIdID) params:params]; @@ -9359,7 +7203,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeMeshLocalPrefixWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeMeshLocalPrefixID) params:params]; @@ -9367,7 +7211,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -9375,7 +7219,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeNeighborTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeNeighborTableID) params:params]; @@ -9383,7 +7227,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRouteTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouteTableID) params:params]; @@ -9391,7 +7235,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePartitionIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdID) params:params]; @@ -9399,7 +7243,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeWeightingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeWeightingID) params:params]; @@ -9407,7 +7251,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDataVersionID) params:params]; @@ -9415,7 +7259,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeStableDataVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeStableDataVersionID) params:params]; @@ -9423,7 +7267,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeLeaderRouterIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRouterIdID) params:params]; @@ -9431,7 +7275,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDetachedRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID) params:params]; @@ -9439,7 +7283,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChildRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChildRoleCountID) params:params]; @@ -9447,7 +7291,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRouterRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID) params:params]; @@ -9455,7 +7299,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeLeaderRoleCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID) params:params]; @@ -9464,7 +7308,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID) params:params]; @@ -9473,7 +7317,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePartitionIdChangeCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID) params:params]; @@ -9482,7 +7326,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeBetterPartitionAttachAttemptCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID) params:params]; @@ -9490,7 +7334,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeParentChangeCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeParentChangeCountID) params:params]; @@ -9498,7 +7342,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxTotalCountID) params:params]; @@ -9506,7 +7350,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID) params:params]; @@ -9514,7 +7358,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID) params:params]; @@ -9523,7 +7367,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID) params:params]; @@ -9531,7 +7375,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxAckedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxAckedCountID) params:params]; @@ -9540,7 +7384,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxNoAckRequestedCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID) params:params]; @@ -9548,7 +7392,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataCountID) params:params]; @@ -9556,7 +7400,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID) params:params]; @@ -9564,7 +7408,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID) params:params]; @@ -9573,7 +7417,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID) params:params]; @@ -9581,7 +7425,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxOtherCountID) params:params]; @@ -9589,7 +7433,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxRetryCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxRetryCountID) params:params]; @@ -9598,7 +7442,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID) params:params]; @@ -9607,7 +7451,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID) params:params]; @@ -9615,7 +7459,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrCcaCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID) params:params]; @@ -9623,7 +7467,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrAbortCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID) params:params]; @@ -9632,7 +7476,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeTxErrBusyChannelCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID) params:params]; @@ -9640,7 +7484,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxTotalCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxTotalCountID) params:params]; @@ -9648,7 +7492,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxUnicastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID) params:params]; @@ -9656,7 +7500,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBroadcastCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID) params:params]; @@ -9664,7 +7508,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDataCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataCountID) params:params]; @@ -9672,7 +7516,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDataPollCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID) params:params]; @@ -9680,7 +7524,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBeaconCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID) params:params]; @@ -9689,7 +7533,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxBeaconRequestCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID) params:params]; @@ -9697,7 +7541,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxOtherCountID) params:params]; @@ -9706,7 +7550,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxAddressFilteredCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID) params:params]; @@ -9715,7 +7559,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDestAddrFilteredCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID) params:params]; @@ -9723,7 +7567,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxDuplicatedCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID) params:params]; @@ -9731,7 +7575,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrNoFrameCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID) params:params]; @@ -9740,7 +7584,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrUnknownNeighborCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID) params:params]; @@ -9749,7 +7593,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrInvalidSrcAddrCountWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID) params:params]; @@ -9757,7 +7601,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrSecCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID) params:params]; @@ -9765,7 +7609,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrFcsCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID) params:params]; @@ -9773,7 +7617,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeRxErrOtherCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID) params:params]; @@ -9781,7 +7625,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeActiveTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveTimestampID) params:params]; @@ -9789,7 +7633,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributePendingTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributePendingTimestampID) params:params]; @@ -9797,7 +7641,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeDelayWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeDelayID) params:params]; @@ -9805,7 +7649,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeSecurityPolicyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeSecurityPolicyID) params:params]; @@ -9813,7 +7657,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeChannelPage0MaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeChannelPage0MaskID) params:params]; @@ -9822,7 +7666,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeOperationalDatasetComponentsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeOperationalDatasetComponentsID) params:params]; @@ -9831,7 +7675,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeActiveNetworkFaultsListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID) params:params]; @@ -9840,7 +7684,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -9849,7 +7693,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -9857,7 +7701,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) params:params]; @@ -9865,7 +7709,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -9873,7 +7717,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -9881,7 +7725,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -9929,12 +7773,11 @@ @implementation MTRClusterWiFiNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -9955,52 +7798,25 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWiFiNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeWiFiNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterWiFiNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10018,7 +7834,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBSSIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBSSIDID) params:params]; @@ -10026,7 +7842,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeSecurityTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeSecurityTypeID) params:params]; @@ -10034,7 +7850,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeWiFiVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeWiFiVersionID) params:params]; @@ -10042,7 +7858,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeChannelNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeChannelNumberID) params:params]; @@ -10050,7 +7866,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeRSSIWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeRSSIID) params:params]; @@ -10058,7 +7874,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBeaconLostCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID) params:params]; @@ -10066,7 +7882,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeBeaconRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID) params:params]; @@ -10075,7 +7891,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketMulticastRxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID) params:params]; @@ -10084,7 +7900,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketMulticastTxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID) params:params]; @@ -10093,7 +7909,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketUnicastRxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID) params:params]; @@ -10102,7 +7918,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributePacketUnicastTxCountWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID) params:params]; @@ -10110,7 +7926,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeCurrentMaxRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID) params:params]; @@ -10118,7 +7934,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -10127,7 +7943,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -10135,7 +7951,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -10143,7 +7959,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) params:params]; @@ -10151,7 +7967,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -10159,7 +7975,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -10167,7 +7983,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -10215,12 +8031,11 @@ @implementation MTRClusterEthernetNetworkDiagnostics - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -10241,52 +8056,25 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeEthernetNetworkDiagnosticsID, + self.endpoint, (unsigned int) MTRClusterIDTypeEthernetNetworkDiagnosticsID, (unsigned int) MTRCommandIDTypeClusterEthernetNetworkDiagnosticsCommandResetCountsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10304,7 +8092,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePHYRateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePHYRateID) params:params]; @@ -10312,7 +8100,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeFullDuplexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFullDuplexID) params:params]; @@ -10320,7 +8108,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePacketRxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketRxCountID) params:params]; @@ -10328,7 +8116,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributePacketTxCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributePacketTxCountID) params:params]; @@ -10336,7 +8124,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeTxErrCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTxErrCountID) params:params]; @@ -10344,7 +8132,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeCollisionCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCollisionCountID) params:params]; @@ -10352,7 +8140,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeOverrunCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeOverrunCountID) params:params]; @@ -10360,7 +8148,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeCarrierDetectWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID) params:params]; @@ -10368,7 +8156,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeTimeSinceResetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID) params:params]; @@ -10377,7 +8165,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID) params:params]; @@ -10386,7 +8174,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; @@ -10394,7 +8182,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) params:params]; @@ -10402,7 +8190,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -10410,7 +8198,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID) params:params]; @@ -10418,7 +8206,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID) params:params]; @@ -10458,12 +8246,11 @@ @implementation MTRClusterTimeSynchronization - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -10475,60 +8262,25 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetUTCTimeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetUTCTime::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.UTCTime = params.utcTime.unsignedLongLongValue; - request.granularity - = static_cast>(params.granularity.unsignedCharValue); - if (params.timeSource != nil) { - auto & definedValue_0 = request.timeSource.Emplace(); - definedValue_0 - = static_cast>(params.timeSource.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setUTCTimeWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10550,59 +8302,25 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTrustedTimeSourceID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetTrustedTimeSource::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.trustedTimeSource == nil) { - request.trustedTimeSource.SetNull(); - } else { - auto & nonNullValue_0 = request.trustedTimeSource.SetNonNull(); - nonNullValue_0.nodeID = params.trustedTimeSource.nodeID.unsignedLongLongValue; - nonNullValue_0.endpoint = params.trustedTimeSource.endpoint.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTrustedTimeSourceWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10625,80 +8343,26 @@ - (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetTimeZoneID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRTimeSynchronizationClusterSetTimeZoneResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TimeSynchronizationClusterSetTimeZoneResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetTimeZone::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.timeZone.count != 0) { - auto * listHolder_0 = new ListHolder(params.timeZone.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.timeZone.count; ++i_0) { - if (![params.timeZone[i_0] isKindOfClass:[MTRTimeSynchronizationClusterTimeZoneStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterTimeZoneStruct *) params.timeZone[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validAt = element_0.validAt.unsignedLongLongValue; - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - definedValue_2 = [self asCharSpan:element_0.name]; - } - } - request.timeZone = ListType_0(listHolder_0->mList, params.timeZone.count); - } else { - request.timeZone = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTimeZoneWithParams:params + completion:^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10720,81 +8384,25 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDSTOffsetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetDSTOffset::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.dstOffset.count != 0) { - auto * listHolder_0 = new ListHolder(params.dstOffset.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.dstOffset.count; ++i_0) { - if (![params.dstOffset[i_0] isKindOfClass:[MTRTimeSynchronizationClusterDSTOffsetStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterDSTOffsetStruct *) params.dstOffset[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validStarting = element_0.validStarting.unsignedLongLongValue; - if (element_0.validUntil == nil) { - listHolder_0->mList[i_0].validUntil.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].validUntil.SetNonNull(); - nonNullValue_2 = element_0.validUntil.unsignedLongLongValue; - } - } - request.DSTOffset = ListType_0(listHolder_0->mList, params.dstOffset.count); - } else { - request.DSTOffset = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setDSTOffsetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10816,58 +8424,25 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + self.endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetDefaultNTPID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TimeSynchronization::Commands::SetDefaultNTP::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.defaultNTP == nil) { - request.defaultNTP.SetNull(); - } else { - auto & nonNullValue_0 = request.defaultNTP.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.defaultNTP]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setDefaultNTPWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -10885,7 +8460,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeUTCTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeUTCTimeID) params:params]; @@ -10893,7 +8468,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeGranularityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGranularityID) params:params]; @@ -10901,7 +8476,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID) params:params]; @@ -10909,7 +8484,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTrustedTimeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeSourceID) params:params]; @@ -10917,7 +8492,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDefaultNTPWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNTPID) params:params]; @@ -10925,7 +8500,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID) params:params]; @@ -10933,7 +8508,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDSTOffsetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetID) params:params]; @@ -10941,7 +8516,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeLocalTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeLocalTimeID) params:params]; @@ -10949,7 +8524,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneDatabaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID) params:params]; @@ -10957,7 +8532,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeNTPServerAvailableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeNTPServerAvailableID) params:params]; @@ -10965,7 +8540,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeTimeZoneListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneListMaxSizeID) params:params]; @@ -10973,7 +8548,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeDSTOffsetListMaxSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetListMaxSizeID) params:params]; @@ -10981,7 +8556,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeSupportsDNSResolveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeSupportsDNSResolveID) params:params]; @@ -10989,7 +8564,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID) params:params]; @@ -10997,7 +8572,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID) params:params]; @@ -11005,7 +8580,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID) params:params]; @@ -11013,7 +8588,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID) params:params]; @@ -11021,7 +8596,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID) params:params]; @@ -11029,7 +8604,7 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID) params:params]; @@ -11041,12 +8616,11 @@ @implementation MTRClusterBridgedDeviceBasicInformation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11054,7 +8628,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorNameID) params:params]; @@ -11062,7 +8636,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeVendorIDID) params:params]; @@ -11070,7 +8644,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeProductNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductNameID) params:params]; @@ -11078,7 +8652,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeNodeLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) params:params]; @@ -11095,7 +8669,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeNodeLabelID) value:dataValueDictionary @@ -11106,7 +8680,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeHardwareVersionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionID) params:params]; @@ -11115,7 +8689,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeHardwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeHardwareVersionStringID) params:params]; @@ -11124,7 +8698,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSoftwareVersionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionID) params:params]; @@ -11133,7 +8707,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSoftwareVersionStringWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionStringID) params:params]; @@ -11142,7 +8716,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeManufacturingDateID) params:params]; @@ -11150,7 +8724,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributePartNumberID) params:params]; @@ -11158,7 +8732,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductURLID) params:params]; @@ -11166,7 +8740,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductLabelID) params:params]; @@ -11174,7 +8748,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSerialNumberID) params:params]; @@ -11182,7 +8756,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeReachableID) params:params]; @@ -11190,7 +8764,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID) params:params]; @@ -11199,7 +8773,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) params:params]; @@ -11208,7 +8782,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -11217,7 +8791,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; @@ -11225,7 +8799,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; @@ -11234,7 +8808,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; @@ -11242,7 +8816,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID) params:params]; @@ -11251,7 +8825,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID) params:params]; @@ -11274,12 +8848,11 @@ @implementation MTRClusterSwitch - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11287,7 +8860,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) params:params]; @@ -11295,7 +8868,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeCurrentPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) params:params]; @@ -11303,7 +8876,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMultiPressMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) params:params]; @@ -11311,7 +8884,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) params:params]; @@ -11319,7 +8892,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; @@ -11327,7 +8900,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; @@ -11335,7 +8908,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; @@ -11343,7 +8916,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) params:params]; @@ -11351,7 +8924,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) params:params]; @@ -11372,12 +8945,11 @@ @implementation MTRClusterAdministratorCommissioning - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11389,61 +8961,26 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - request.PAKEPasscodeVerifier = [self asByteSpan:params.pakePasscodeVerifier]; - request.discriminator = params.discriminator.unsignedShortValue; - request.iterations = params.iterations.unsignedIntValue; - request.salt = [self asByteSpan:params.salt]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster openCommissioningWindowWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11465,57 +9002,26 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandOpenBasicCommissioningWindowID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster openBasicCommissioningWindowWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11546,55 +9052,25 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, + self.endpoint, (unsigned int) MTRClusterIDTypeAdministratorCommissioningID, (unsigned int) MTRCommandIDTypeClusterAdministratorCommissioningCommandRevokeCommissioningID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::RevokeCommissioning::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster revokeCommissioningWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11612,7 +9088,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; @@ -11621,7 +9097,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAdminFabricIndexWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) params:params]; @@ -11629,7 +9105,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAdminVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; @@ -11638,7 +9114,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) params:params]; @@ -11647,7 +9123,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; @@ -11655,7 +9131,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; @@ -11663,7 +9139,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; @@ -11671,7 +9147,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; @@ -11679,7 +9155,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; @@ -11739,12 +9215,11 @@ @implementation MTRClusterOperationalCredentials - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -11757,54 +9232,26 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAttestationRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterAttestationResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterAttestationResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AttestationRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.attestationNonce = [self asByteSpan:params.attestationNonce]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster attestationRequestWithParams:params + completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11827,55 +9274,27 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCertificateChainRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCertificateChainResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CertificateChainRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.certificateType = static_cast>( - params.certificateType.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + certificateChainRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11898,58 +9317,26 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandCSRRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterCSRResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCSRResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CSRRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.CSRNonce = [self asByteSpan:params.csrNonce]; - if (params.isForUpdateNOC != nil) { - auto & definedValue_0 = request.isForUpdateNOC.Emplace(); - definedValue_0 = params.isForUpdateNOC.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + CSRRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -11972,62 +9359,26 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddNOCID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddNOC::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - request.IPKValue = [self asByteSpan:params.ipkValue]; - request.caseAdminSubject = params.caseAdminSubject.unsignedLongLongValue; - request.adminVendorId = static_cast>( - params.adminVendorId.unsignedShortValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + addNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12050,58 +9401,26 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateNOCID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateNOC::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + updateNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12124,54 +9443,26 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandUpdateFabricLabelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateFabricLabel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.label = [self asCharSpan:params.label]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster updateFabricLabelWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12194,54 +9485,26 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandRemoveFabricID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::RemoveFabric::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.fabricIndex = params.fabricIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster removeFabricWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12263,54 +9526,26 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeOperationalCredentialsID, (unsigned int) MTRCommandIDTypeClusterOperationalCredentialsCommandAddTrustedRootCertificateID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster addTrustedRootCertificateWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12328,7 +9563,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) params:params]; @@ -12336,7 +9571,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) params:params]; @@ -12344,7 +9579,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeSupportedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; @@ -12352,7 +9587,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeCommissionedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; @@ -12361,7 +9596,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeTrustedRootCertificatesWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) params:params]; @@ -12369,7 +9604,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeCurrentFabricIndexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; @@ -12378,7 +9613,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) params:params]; @@ -12386,7 +9621,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; @@ -12394,7 +9629,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; @@ -12402,7 +9637,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; @@ -12410,7 +9645,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) params:params]; @@ -12418,7 +9653,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; @@ -12553,12 +9788,11 @@ @implementation MTRClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -12570,92 +9804,25 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetWriteID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetWrite::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; - request.groupKeySet.groupKeySecurityPolicy - = static_cast>( - params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); - if (params.groupKeySet.epochKey0 == nil) { - request.groupKeySet.epochKey0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey0]; - } - if (params.groupKeySet.epochStartTime0 == nil) { - request.groupKeySet.epochStartTime0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime0.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime0.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey1 == nil) { - request.groupKeySet.epochKey1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey1.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey1]; - } - if (params.groupKeySet.epochStartTime1 == nil) { - request.groupKeySet.epochStartTime1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime1.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime1.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey2 == nil) { - request.groupKeySet.epochKey2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey2.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey2]; - } - if (params.groupKeySet.epochStartTime2 == nil) { - request.groupKeySet.epochStartTime2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime2.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12678,54 +9845,26 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRead::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12747,53 +9886,25 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetRemoveID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRemove::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12827,53 +9938,26 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeGroupKeyManagementID, (unsigned int) MTRCommandIDTypeClusterGroupKeyManagementCommandKeySetReadAllIndicesID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster keySetReadAllIndicesWithParams:params + completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -12891,7 +9975,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; @@ -12908,7 +9992,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary @@ -12918,7 +10002,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) params:params]; @@ -12926,7 +10010,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeMaxGroupsPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; @@ -12934,7 +10018,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeMaxGroupKeysPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; @@ -12942,7 +10026,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; @@ -12950,7 +10034,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; @@ -12958,7 +10042,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; @@ -12966,7 +10050,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; @@ -12974,7 +10058,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) params:params]; @@ -12982,7 +10066,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; @@ -13053,12 +10137,11 @@ @implementation MTRClusterFixedLabel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13066,7 +10149,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) params:params]; @@ -13074,7 +10157,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) params:params]; @@ -13082,7 +10165,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; @@ -13090,7 +10173,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; @@ -13098,7 +10181,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; @@ -13106,7 +10189,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) params:params]; @@ -13114,7 +10197,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) params:params]; @@ -13135,12 +10218,11 @@ @implementation MTRClusterUserLabel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13148,7 +10230,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) params:params]; @@ -13165,7 +10247,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) value:dataValueDictionary @@ -13175,7 +10257,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) params:params]; @@ -13183,7 +10265,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; @@ -13191,7 +10273,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; @@ -13199,7 +10281,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; @@ -13207,7 +10289,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) params:params]; @@ -13215,7 +10297,7 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) params:params]; @@ -13236,12 +10318,11 @@ @implementation MTRClusterBooleanState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13249,7 +10330,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) params:params]; @@ -13257,7 +10338,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) params:params]; @@ -13265,7 +10346,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; @@ -13273,7 +10354,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; @@ -13281,7 +10362,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; @@ -13289,7 +10370,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) params:params]; @@ -13297,7 +10378,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) params:params]; @@ -13318,12 +10399,11 @@ @implementation MTRClusterICDManagement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13336,60 +10416,26 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandRegisterClientID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRICDManagementClusterRegisterClientResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ICDManagementClusterRegisterClientResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::RegisterClient::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.checkInNodeID = params.checkInNodeID.unsignedLongLongValue; - request.monitoredSubject = params.monitoredSubject.unsignedLongLongValue; - request.key = [self asByteSpan:params.key]; - if (params.verificationKey != nil) { - auto & definedValue_0 = request.verificationKey.Emplace(); - definedValue_0 = [self asByteSpan:params.verificationKey]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster registerClientWithParams:params + completion:^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13411,57 +10457,25 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::UnregisterClient::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.checkInNodeID = params.checkInNodeID.unsignedLongLongValue; - if (params.verificationKey != nil) { - auto & definedValue_0 = request.verificationKey.Emplace(); - definedValue_0 = [self asByteSpan:params.verificationKey]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unregisterClientWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13492,52 +10506,25 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, + self.endpoint, (unsigned int) MTRClusterIDTypeICDManagementID, (unsigned int) MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - IcdManagement::Commands::StayActiveRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stayActiveRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13555,7 +10542,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeIdleModeIntervalWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeIdleModeIntervalID) params:params]; @@ -13563,7 +10550,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeActiveModeIntervalWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeIntervalID) params:params]; @@ -13571,7 +10558,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID) params:params]; @@ -13579,7 +10566,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID) params:params]; @@ -13587,7 +10574,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID) params:params]; @@ -13595,7 +10582,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; @@ -13603,7 +10590,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; @@ -13611,7 +10598,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; @@ -13619,7 +10606,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; @@ -13627,7 +10614,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; @@ -13635,7 +10622,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID) params:params]; @@ -13643,7 +10630,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID) params:params]; @@ -13655,12 +10642,11 @@ @implementation MTRClusterModeSelect - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13672,53 +10658,25 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeModeSelectID, + self.endpoint, (unsigned int) MTRClusterIDTypeModeSelectID, (unsigned int) MTRCommandIDTypeClusterModeSelectCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ModeSelect::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13736,7 +10694,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; @@ -13744,7 +10702,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; @@ -13752,7 +10710,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; @@ -13760,7 +10718,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; @@ -13768,7 +10726,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; @@ -13785,7 +10743,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary @@ -13795,7 +10753,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; @@ -13812,7 +10770,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary @@ -13822,7 +10780,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; @@ -13830,7 +10788,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; @@ -13838,7 +10796,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; @@ -13846,7 +10804,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; @@ -13854,7 +10812,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; @@ -13862,7 +10820,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; @@ -13893,12 +10851,11 @@ @implementation MTRClusterLaundryWasherMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -13911,54 +10868,26 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeLaundryWasherModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeLaundryWasherModeID, (unsigned int) MTRCommandIDTypeClusterLaundryWasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRLaundryWasherModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - LaundryWasherModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LaundryWasherMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -13976,7 +10905,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; @@ -13984,7 +10913,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; @@ -13992,7 +10921,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; @@ -14009,7 +10938,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary @@ -14019,7 +10948,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; @@ -14036,7 +10965,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary @@ -14046,7 +10975,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; @@ -14054,7 +10983,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; @@ -14062,7 +10991,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; @@ -14070,7 +10999,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; @@ -14078,7 +11007,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; @@ -14086,7 +11015,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; @@ -14098,12 +11027,11 @@ @implementation MTRClusterRefrigeratorAndTemperatureControlledCabinetMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14118,57 +11046,29 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID, (unsigned int) MTRCommandIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast( - bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeToModeWithParams:params + completion:^( + MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14187,7 +11087,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) @@ -14197,7 +11097,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) @@ -14207,7 +11107,7 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) @@ -14226,7 +11126,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) @@ -14238,7 +11138,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; @@ -14256,7 +11156,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary @@ -14267,7 +11167,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) @@ -14277,7 +11177,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) @@ -14287,7 +11187,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; @@ -14296,7 +11196,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) @@ -14306,7 +11206,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; @@ -14315,7 +11215,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID: @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) @@ -14328,12 +11228,11 @@ @implementation MTRClusterLaundryWasherControls - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14341,7 +11240,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; @@ -14349,7 +11248,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; @@ -14366,7 +11265,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary @@ -14376,7 +11275,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *) - (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; @@ -14393,7 +11292,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary @@ -14403,7 +11302,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; @@ -14411,7 +11310,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; @@ -14419,7 +11318,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; @@ -14427,7 +11326,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; @@ -14435,7 +11334,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; @@ -14443,7 +11342,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; @@ -14451,7 +11350,7 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; @@ -14463,12 +11362,11 @@ @implementation MTRClusterRVCRunMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14481,54 +11379,26 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCRunModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCRunModeID, (unsigned int) MTRCommandIDTypeClusterRVCRunModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCRunModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCRunModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcRunMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeToModeWithParams:params + completion:^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14546,7 +11416,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; @@ -14554,7 +11424,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; @@ -14562,7 +11432,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeStartUpModeID) params:params]; @@ -14579,7 +11449,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeStartUpModeID) value:dataValueDictionary @@ -14589,7 +11459,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; @@ -14606,7 +11476,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary @@ -14616,7 +11486,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; @@ -14624,7 +11494,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; @@ -14632,7 +11502,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; @@ -14640,7 +11510,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; @@ -14648,7 +11518,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; @@ -14656,7 +11526,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; @@ -14668,12 +11538,11 @@ @implementation MTRClusterRVCCleanMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14686,54 +11555,26 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCCleanModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCCleanModeID, (unsigned int) MTRCommandIDTypeClusterRVCCleanModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCCleanModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCCleanModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcCleanMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^( + MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14751,7 +11592,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; @@ -14759,7 +11600,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; @@ -14767,7 +11608,7 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeStartUpModeID) params:params]; @@ -14784,7 +11625,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeStartUpModeID) value:dataValueDictionary @@ -14794,7 +11635,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; @@ -14811,7 +11652,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary @@ -14821,7 +11662,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; @@ -14829,7 +11670,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; @@ -14837,7 +11678,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; @@ -14845,7 +11686,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; @@ -14853,7 +11694,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; @@ -14861,7 +11702,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; @@ -14873,12 +11714,11 @@ @implementation MTRClusterTemperatureControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -14890,62 +11730,25 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTemperatureControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeTemperatureControlID, (unsigned int) MTRCommandIDTypeClusterTemperatureControlCommandSetTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TemperatureControl::Commands::SetTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.targetTemperature != nil) { - auto & definedValue_0 = request.targetTemperature.Emplace(); - definedValue_0 = params.targetTemperature.shortValue; - } - if (params.targetTemperatureLevel != nil) { - auto & definedValue_0 = request.targetTemperatureLevel.Emplace(); - definedValue_0 = params.targetTemperatureLevel.unsignedCharValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -14963,7 +11766,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; @@ -14971,7 +11774,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; @@ -14979,7 +11782,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; @@ -14987,7 +11790,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; @@ -14996,7 +11799,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; @@ -15005,7 +11808,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; @@ -15013,7 +11816,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; @@ -15021,7 +11824,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; @@ -15029,7 +11832,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; @@ -15037,7 +11840,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; @@ -15045,7 +11848,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; @@ -15053,7 +11856,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; @@ -15065,12 +11868,11 @@ @implementation MTRClusterRefrigeratorAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15078,7 +11880,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; @@ -15086,7 +11888,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; @@ -15094,7 +11896,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; @@ -15102,7 +11904,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; @@ -15110,7 +11912,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; @@ -15118,7 +11920,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; @@ -15126,7 +11928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; @@ -15134,7 +11936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; @@ -15142,7 +11944,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; @@ -15154,12 +11956,11 @@ @implementation MTRClusterDishwasherMode - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15172,54 +11973,26 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherModeID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherModeID, (unsigned int) MTRCommandIDTypeClusterDishwasherModeCommandChangeToModeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDishwasherModeClusterChangeToModeResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DishwasherModeClusterChangeToModeResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherMode::Commands::ChangeToMode::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.newMode = params.newMode.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeToModeWithParams:params + completion:^( + MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15237,7 +12010,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; @@ -15245,7 +12018,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; @@ -15253,7 +12026,7 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par - (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; @@ -15270,7 +12043,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary @@ -15280,7 +12053,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; @@ -15297,7 +12070,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary @@ -15307,7 +12080,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; @@ -15315,7 +12088,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; @@ -15323,7 +12096,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; @@ -15331,7 +12104,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; @@ -15339,7 +12112,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; @@ -15347,7 +12120,7 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; @@ -15359,12 +12132,11 @@ @implementation MTRClusterAirQuality - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15372,7 +12144,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; @@ -15380,7 +12152,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; @@ -15388,7 +12160,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; @@ -15396,7 +12168,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; @@ -15404,7 +12176,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; @@ -15412,7 +12184,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; @@ -15420,7 +12192,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; @@ -15432,12 +12204,11 @@ @implementation MTRClusterSmokeCOAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15458,52 +12229,25 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeSmokeCOAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeSmokeCOAlarmID, (unsigned int) MTRCommandIDTypeClusterSmokeCOAlarmCommandSelfTestRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - SmokeCoAlarm::Commands::SelfTestRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selfTestRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15521,7 +12265,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; @@ -15529,7 +12273,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; @@ -15537,7 +12281,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; @@ -15545,7 +12289,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; @@ -15553,7 +12297,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; @@ -15561,7 +12305,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; @@ -15569,7 +12313,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; @@ -15577,7 +12321,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; @@ -15585,7 +12329,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; @@ -15593,7 +12337,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; @@ -15601,7 +12345,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; @@ -15609,7 +12353,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * - (NSDictionary *)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; @@ -15628,7 +12372,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; @@ -15646,7 +12390,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; @@ -15654,7 +12398,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; @@ -15662,7 +12406,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; @@ -15670,7 +12414,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; @@ -15678,7 +12422,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; @@ -15686,7 +12430,7 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; @@ -15698,12 +12442,11 @@ @implementation MTRClusterDishwasherAlarm - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15715,53 +12458,25 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandResetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherAlarm::Commands::Reset::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.alarms = static_cast>(params.alarms.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15783,53 +12498,25 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, + self.endpoint, (unsigned int) MTRClusterIDTypeDishwasherAlarmID, (unsigned int) MTRCommandIDTypeClusterDishwasherAlarmCommandModifyEnabledAlarmsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DishwasherAlarm::Commands::ModifyEnabledAlarms::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mask = static_cast>(params.mask.unsignedIntValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster modifyEnabledAlarmsWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -15847,7 +12534,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; @@ -15855,7 +12542,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; @@ -15863,7 +12550,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; @@ -15871,7 +12558,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; @@ -15879,7 +12566,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; @@ -15887,7 +12574,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; @@ -15895,7 +12582,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; @@ -15903,7 +12590,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; @@ -15911,7 +12598,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; @@ -15919,7 +12606,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; @@ -15931,12 +12618,11 @@ @implementation MTRClusterOperationalState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -15956,53 +12642,26 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16032,53 +12691,26 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16108,53 +12740,26 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Start::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startWithParams:params + completion:^( + MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16184,53 +12789,26 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeOperationalStateID, (unsigned int) MTRCommandIDTypeClusterOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTROperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalState::Commands::Resume::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeWithParams:params + completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16248,7 +12826,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; @@ -16256,7 +12834,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; @@ -16264,7 +12842,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; @@ -16272,7 +12850,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; @@ -16280,7 +12858,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; @@ -16288,7 +12866,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; @@ -16296,7 +12874,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; @@ -16304,7 +12882,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; @@ -16312,7 +12890,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; @@ -16320,7 +12898,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; @@ -16328,7 +12906,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; @@ -16336,7 +12914,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; @@ -16348,12 +12926,11 @@ @implementation MTRClusterRVCOperationalState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -16373,53 +12950,26 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16449,53 +12999,26 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16525,53 +13048,26 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandStartID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Start::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16601,53 +13097,26 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, + self.endpoint, (unsigned int) MTRClusterIDTypeRVCOperationalStateID, (unsigned int) MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRRVCOperationalStateClusterOperationalCommandResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - RVCOperationalStateClusterOperationalCommandResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - RvcOperationalState::Commands::Resume::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resumeWithParams:params + completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16665,7 +13134,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; @@ -16673,7 +13142,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; @@ -16681,7 +13150,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; @@ -16689,7 +13158,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; @@ -16697,7 +13166,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; @@ -16705,7 +13174,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; @@ -16713,7 +13182,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; @@ -16721,7 +13190,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; @@ -16729,7 +13198,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; @@ -16737,7 +13206,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; @@ -16745,7 +13214,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; @@ -16753,7 +13222,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; @@ -16765,12 +13234,11 @@ @implementation MTRClusterHEPAFilterMonitoring - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -16791,52 +13259,25 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeHEPAFilterMonitoringID, + self.endpoint, (unsigned int) MTRClusterIDTypeHEPAFilterMonitoringID, (unsigned int) MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - HepaFilterMonitoring::Commands::ResetCondition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetConditionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -16854,7 +13295,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID) params:params]; @@ -16862,7 +13303,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID) params:params]; @@ -16870,7 +13311,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeChangeIndicationID) params:params]; @@ -16878,7 +13319,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeInPlaceIndicatorID) params:params]; @@ -16886,7 +13327,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa - (NSDictionary *)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) params:params]; @@ -16903,7 +13344,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary @@ -16914,7 +13355,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeReplacementProductListID) params:params]; @@ -16922,7 +13363,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID) params:params]; @@ -16930,7 +13371,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID) params:params]; @@ -16938,7 +13379,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID) params:params]; @@ -16946,7 +13387,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID) params:params]; @@ -16954,7 +13395,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID) params:params]; @@ -16962,7 +13403,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID) params:params]; @@ -16974,12 +13415,11 @@ @implementation MTRClusterActivatedCarbonFilterMonitoring - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -17000,52 +13440,25 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeActivatedCarbonFilterMonitoringID, + self.endpoint, (unsigned int) MTRClusterIDTypeActivatedCarbonFilterMonitoringID, (unsigned int) MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster resetConditionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17063,7 +13476,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeConditionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeConditionID) params:params]; @@ -17072,7 +13485,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeDegradationDirectionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeDegradationDirectionID) params:params]; @@ -17081,7 +13494,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeChangeIndicationWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeChangeIndicationID) params:params]; @@ -17090,7 +13503,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeInPlaceIndicatorWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeInPlaceIndicatorID) params:params]; @@ -17099,7 +13512,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset - (NSDictionary *)readAttributeLastChangedTimeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) params:params]; @@ -17116,7 +13529,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeLastChangedTimeID) value:dataValueDictionary @@ -17127,7 +13540,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeReplacementProductListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeReplacementProductListID) params:params]; @@ -17136,7 +13549,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID) params:params]; @@ -17145,7 +13558,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID) params:params]; @@ -17153,7 +13566,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID) params:params]; @@ -17162,7 +13575,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID) params:params]; @@ -17170,7 +13583,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID) params:params]; @@ -17179,7 +13592,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID) params:params]; @@ -17191,12 +13604,11 @@ @implementation MTRClusterDoorLock - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -17208,61 +13620,25 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandLockDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::LockDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster lockDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17284,61 +13660,25 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unlockDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17360,60 +13700,25 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnlockWithTimeoutID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnlockWithTimeout::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.timeout = params.timeout.unsignedShortValue; - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unlockWithTimeoutWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17435,60 +13740,25 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.daysMask - = static_cast>(params.daysMask.unsignedCharValue); - request.startHour = params.startHour.unsignedCharValue; - request.startMinute = params.startMinute.unsignedCharValue; - request.endHour = params.endHour.unsignedCharValue; - request.endMinute = params.endMinute.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17511,55 +13781,26 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetWeekDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getWeekDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17581,54 +13822,25 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearWeekDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearWeekDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17650,56 +13862,25 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17722,55 +13903,26 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetYearDayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17792,54 +13944,25 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearYearDayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearYearDaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17861,57 +13984,25 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - request.operatingMode - = static_cast>(params.operatingMode.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -17934,54 +14025,26 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetHolidayScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18003,53 +14066,25 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearHolidayScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearHolidaySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18071,91 +14106,25 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.userIndex = params.userIndex.unsignedShortValue; - if (params.userName == nil) { - request.userName.SetNull(); - } else { - auto & nonNullValue_0 = request.userName.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.userName]; - } - if (params.userUniqueID == nil) { - request.userUniqueID.SetNull(); - } else { - auto & nonNullValue_0 = request.userUniqueID.SetNonNull(); - nonNullValue_0 = params.userUniqueID.unsignedIntValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - if (params.credentialRule == nil) { - request.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = request.credentialRule.SetNonNull(); - nonNullValue_0 - = static_cast>(params.credentialRule.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setUserWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18177,53 +14146,25 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetUserResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetUserResponseCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18245,56 +14186,25 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearUserID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearUser::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.userIndex = params.userIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18317,83 +14227,26 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandSetCredentialID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterSetCredentialResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterSetCredentialResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::SetCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - request.credentialData = [self asByteSpan:params.credentialData]; - if (params.userIndex == nil) { - request.userIndex.SetNull(); - } else { - auto & nonNullValue_0 = request.userIndex.SetNonNull(); - nonNullValue_0 = params.userIndex.unsignedShortValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 - = static_cast>(params.userType.unsignedCharValue); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18416,57 +14269,26 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - DoorLockClusterGetCredentialStatusResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::GetCredentialStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.credential.credentialType - = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18488,63 +14310,25 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, + self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandClearCredentialID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::ClearCredential::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params.credential == nil) { - request.credential.SetNull(); - } else { - auto & nonNullValue_0 = request.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18566,61 +14350,25 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeDoorLockID, (unsigned int) MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - DoorLock::Commands::UnboltDoor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.PINCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster unboltDoorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -18638,7 +14386,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; @@ -18646,7 +14394,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeLockTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockTypeID) params:params]; @@ -18654,7 +14402,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeActuatorEnabledWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeActuatorEnabledID) params:params]; @@ -18662,7 +14410,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeDoorStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorStateID) params:params]; @@ -18670,7 +14418,7 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par - (NSDictionary *)readAttributeDoorOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) params:params]; @@ -18687,7 +14435,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorOpenEventsID) value:dataValueDictionary @@ -18697,7 +14445,7 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeDoorClosedEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) params:params]; @@ -18714,7 +14462,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDoorClosedEventsID) value:dataValueDictionary @@ -18724,7 +14472,7 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSDictionary *) - (NSDictionary *)readAttributeOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) params:params]; @@ -18741,7 +14489,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOpenPeriodID) value:dataValueDictionary @@ -18751,7 +14499,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfTotalUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfTotalUsersSupportedID) params:params]; @@ -18759,7 +14507,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfPINUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfPINUsersSupportedID) params:params]; @@ -18767,7 +14515,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfRFIDUsersSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfRFIDUsersSupportedID) params:params]; @@ -18776,7 +14524,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfWeekDaySchedulesSupportedPerUserID) params:params]; @@ -18785,7 +14533,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfYearDaySchedulesSupportedPerUserID) params:params]; @@ -18793,7 +14541,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfHolidaySchedulesSupportedID) params:params]; @@ -18801,7 +14549,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMaxPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxPINCodeLengthID) params:params]; @@ -18809,7 +14557,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMinPINCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinPINCodeLengthID) params:params]; @@ -18817,7 +14565,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMaxRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMaxRFIDCodeLengthID) params:params]; @@ -18825,7 +14573,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeMinRFIDCodeLengthWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeMinRFIDCodeLengthID) params:params]; @@ -18833,7 +14581,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeCredentialRulesSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeCredentialRulesSupportID) params:params]; @@ -18842,7 +14590,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfCredentialsSupportedPerUserID) params:params]; @@ -18850,7 +14598,7 @@ - (void)writeAttributeOpenPeriodWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLanguageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) params:params]; @@ -18867,7 +14615,7 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLanguageID) value:dataValueDictionary @@ -18877,7 +14625,7 @@ - (void)writeAttributeLanguageWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLEDSettingsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) params:params]; @@ -18894,7 +14642,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLEDSettingsID) value:dataValueDictionary @@ -18904,7 +14652,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAutoRelockTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) params:params]; @@ -18921,7 +14669,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAutoRelockTimeID) value:dataValueDictionary @@ -18931,7 +14679,7 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSoundVolumeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) params:params]; @@ -18948,7 +14696,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSoundVolumeID) value:dataValueDictionary @@ -18958,7 +14706,7 @@ - (void)writeAttributeSoundVolumeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) params:params]; @@ -18975,7 +14723,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeOperatingModeID) value:dataValueDictionary @@ -18985,7 +14733,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeSupportedOperatingModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSupportedOperatingModesID) params:params]; @@ -18993,7 +14741,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeDefaultConfigurationRegisterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeDefaultConfigurationRegisterID) params:params]; @@ -19001,7 +14749,7 @@ - (void)writeAttributeOperatingModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeEnableLocalProgrammingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableLocalProgrammingID) params:params]; @@ -19020,7 +14768,7 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSDictionary *)readAttributeEnableOneTouchLockingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableOneTouchLockingID) params:params]; @@ -19049,7 +14797,7 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSDictionary *)readAttributeEnableInsideStatusLEDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnableInsideStatusLEDID) params:params]; @@ -19078,7 +14826,7 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSDictionary *)readAttributeEnablePrivacyModeButtonWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEnablePrivacyModeButtonID) params:params]; @@ -19107,7 +14855,7 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSDictionary *)readAttributeLocalProgrammingFeaturesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLocalProgrammingFeaturesID) params:params]; @@ -19136,7 +14884,7 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSDictionary *)readAttributeWrongCodeEntryLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) params:params]; @@ -19163,7 +14911,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeWrongCodeEntryLimitID) value:dataValueDictionary @@ -19173,7 +14921,7 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSDictionary - (NSDictionary *)readAttributeUserCodeTemporaryDisableTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeUserCodeTemporaryDisableTimeID) params:params]; @@ -19192,7 +14940,7 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSDictionary *)readAttributeSendPINOverTheAirWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) params:params]; @@ -19219,7 +14967,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID) value:dataValueDictionary @@ -19229,7 +14977,7 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSDictionary * - (NSDictionary *)readAttributeRequirePINforRemoteOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID) params:params]; @@ -19248,7 +14996,7 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSDictionary *)readAttributeExpiringUserTimeoutWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) params:params]; @@ -19275,7 +15023,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) value:dataValueDictionary @@ -19285,7 +15033,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID) params:params]; @@ -19293,7 +15041,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID) params:params]; @@ -19301,7 +15049,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) params:params]; @@ -19309,7 +15057,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID) params:params]; @@ -19317,7 +15065,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID) params:params]; @@ -19325,7 +15073,7 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID) params:params]; @@ -19554,12 +15302,11 @@ @implementation MTRClusterWindowCovering - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -19577,52 +15324,25 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandUpOrOpenID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::UpOrOpen::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster upOrOpenWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19653,52 +15373,25 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandDownOrCloseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::DownOrClose::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster downOrCloseWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19729,52 +15422,25 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandStopMotionID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::StopMotion::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopMotionWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19796,53 +15462,25 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftValueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftValue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftValue = params.liftValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToLiftValueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19864,53 +15502,25 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToLiftPercentageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftPercentage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -19932,53 +15542,25 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltValueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltValue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltValue = params.tiltValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToTiltValueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20000,53 +15582,25 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, + self.endpoint, (unsigned int) MTRClusterIDTypeWindowCoveringID, (unsigned int) MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltPercentageID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltPercentage::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20064,7 +15618,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTypeID) params:params]; @@ -20072,7 +15626,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributePhysicalClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitLiftID) params:params]; @@ -20080,7 +15634,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributePhysicalClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributePhysicalClosedLimitTiltID) params:params]; @@ -20088,7 +15642,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftID) params:params]; @@ -20096,7 +15650,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltID) params:params]; @@ -20104,7 +15658,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeNumberOfActuationsLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsLiftID) params:params]; @@ -20112,7 +15666,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeNumberOfActuationsTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeNumberOfActuationsTiltID) params:params]; @@ -20120,7 +15674,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeConfigStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeConfigStatusID) params:params]; @@ -20129,7 +15683,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftPercentageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercentageID) params:params]; @@ -20138,7 +15692,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltPercentageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercentageID) params:params]; @@ -20146,7 +15700,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeOperationalStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeOperationalStatusID) params:params]; @@ -20155,7 +15709,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTargetPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionLiftPercent100thsID) params:params]; @@ -20164,7 +15718,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeTargetPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeTargetPositionTiltPercent100thsID) params:params]; @@ -20172,7 +15726,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeEndProductTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEndProductTypeID) params:params]; @@ -20181,7 +15735,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionLiftPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionLiftPercent100thsID) params:params]; @@ -20190,7 +15744,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeCurrentPositionTiltPercent100thsWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeCurrentPositionTiltPercent100thsID) params:params]; @@ -20198,7 +15752,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledOpenLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitLiftID) params:params]; @@ -20206,7 +15760,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledClosedLimitLiftWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitLiftID) params:params]; @@ -20214,7 +15768,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledOpenLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledOpenLimitTiltID) params:params]; @@ -20222,7 +15776,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeInstalledClosedLimitTiltWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeInstalledClosedLimitTiltID) params:params]; @@ -20230,7 +15784,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage - (NSDictionary *)readAttributeModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) params:params]; @@ -20247,7 +15801,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeModeID) value:dataValueDictionary @@ -20257,7 +15811,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID) params:params]; @@ -20265,7 +15819,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID) params:params]; @@ -20273,7 +15827,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID) params:params]; @@ -20281,7 +15835,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) params:params]; @@ -20289,7 +15843,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID) params:params]; @@ -20297,7 +15851,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID) params:params]; @@ -20305,7 +15859,7 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID) params:params]; @@ -20423,12 +15977,11 @@ @implementation MTRClusterBarrierControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -20440,53 +15993,25 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlGoToPercent::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.percentOpen = params.percentOpen.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster barrierControlGoToPercentWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20517,52 +16042,25 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeBarrierControlID, (unsigned int) MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlStop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster barrierControlStopWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -20580,7 +16078,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) params:params]; @@ -20588,7 +16086,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; @@ -20596,7 +16094,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; @@ -20604,7 +16102,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop - (NSDictionary *)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; @@ -20621,7 +16119,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary @@ -20631,7 +16129,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; @@ -20648,7 +16146,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary @@ -20658,7 +16156,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; @@ -20677,7 +16175,7 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; @@ -20706,7 +16204,7 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; @@ -20733,7 +16231,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary @@ -20743,7 +16241,7 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary * - (NSDictionary *)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; @@ -20760,7 +16258,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary @@ -20770,7 +16268,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) params:params]; @@ -20778,7 +16276,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) params:params]; @@ -20786,7 +16284,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) params:params]; @@ -20794,7 +16292,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) params:params]; @@ -20802,7 +16300,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) params:params]; @@ -20810,7 +16308,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) params:params]; @@ -20818,7 +16316,7 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) params:params]; @@ -20868,12 +16366,11 @@ @implementation MTRClusterPumpConfigurationAndControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -20881,7 +16378,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; @@ -20889,7 +16386,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; @@ -20897,7 +16394,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; @@ -20906,7 +16403,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) params:params]; @@ -20915,7 +16412,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) params:params]; @@ -20924,7 +16421,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinCompPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) params:params]; @@ -20933,7 +16430,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxCompPressureWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) params:params]; @@ -20941,7 +16438,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; @@ -20949,7 +16446,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; @@ -20957,7 +16454,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; @@ -20965,7 +16462,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; @@ -20973,7 +16470,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; @@ -20981,7 +16478,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; @@ -20989,7 +16486,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePumpStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; @@ -20998,7 +16495,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEffectiveOperationModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) params:params]; @@ -21007,7 +16504,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEffectiveControlModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) params:params]; @@ -21015,7 +16512,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeCapacityID) params:params]; @@ -21023,7 +16520,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeSpeedID) params:params]; @@ -21032,7 +16529,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLifetimeRunningHoursWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeRunningHoursID) params:params]; @@ -21049,7 +16546,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)readAttributePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePowerID) params:params]; @@ -21068,7 +16565,7 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSDictionary *)readAttributeLifetimeEnergyConsumedWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeLifetimeEnergyConsumedID) params:params]; @@ -21088,7 +16585,7 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSDictionary *)readAttributeOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) params:params]; @@ -21115,7 +16612,7 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeOperationModeID) value:dataValueDictionary @@ -21125,7 +16622,7 @@ - (void)writeAttributeOperationModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) params:params]; @@ -21142,7 +16639,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID) value:dataValueDictionary @@ -21153,7 +16650,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID) params:params]; @@ -21162,7 +16659,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) params:params]; @@ -21170,7 +16667,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) params:params]; @@ -21178,7 +16675,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID) params:params]; @@ -21186,7 +16683,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID) params:params]; @@ -21195,7 +16692,7 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID) params:params]; @@ -21216,12 +16713,11 @@ @implementation MTRClusterThermostat - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -21233,54 +16729,25 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetpointRaiseLowerID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetpointRaiseLower::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.amount = params.amount.charValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setpointRaiseLowerWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21302,91 +16769,25 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::SetWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; - request.dayOfWeekForSequence = static_cast>( - params.dayOfWeekForSequence.unsignedCharValue); - request.modeForSequence = static_cast>( - params.modeForSequence.unsignedCharValue); - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.transitions.count != 0) { - auto * listHolder_0 = new ListHolder(params.transitions.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.transitions.count; ++i_0) { - if (![params.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) params.transitions[i_0]; - listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; - if (element_0.heatSetpoint == nil) { - listHolder_0->mList[i_0].heatSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); - nonNullValue_2 = element_0.heatSetpoint.shortValue; - } - if (element_0.coolSetpoint == nil) { - listHolder_0->mList[i_0].coolSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); - nonNullValue_2 = element_0.coolSetpoint.shortValue; - } - } - request.transitions = ListType_0(listHolder_0->mList, params.transitions.count); - } else { - request.transitions = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster setWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21409,57 +16810,26 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ThermostatClusterGetWeeklyScheduleResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::GetWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.daysToReturn - = static_cast>(params.daysToReturn.unsignedCharValue); - request.modeToReturn - = static_cast>(params.modeToReturn.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getWeeklyScheduleWithParams:params + completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21490,52 +16860,25 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeThermostatID, + self.endpoint, (unsigned int) MTRClusterIDTypeThermostatID, (unsigned int) MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Thermostat::Commands::ClearWeeklySchedule::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster clearWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -21553,7 +16896,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; @@ -21561,7 +16904,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeOutdoorTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOutdoorTemperatureID) params:params]; @@ -21569,7 +16912,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupancyID) params:params]; @@ -21577,7 +16920,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinHeatSetpointLimitID) params:params]; @@ -21585,7 +16928,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxHeatSetpointLimitID) params:params]; @@ -21593,7 +16936,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMinCoolSetpointLimitID) params:params]; @@ -21601,7 +16944,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeAbsMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID) params:params]; @@ -21609,7 +16952,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributePICoolingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID) params:params]; @@ -21617,7 +16960,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributePIHeatingDemandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) params:params]; @@ -21625,7 +16968,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa - (NSDictionary *)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; @@ -21644,7 +16987,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; @@ -21673,7 +17016,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)readAttributeOccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID) params:params]; @@ -21702,7 +17045,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeOccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID) params:params]; @@ -21731,7 +17074,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedCoolingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedCoolingSetpointID) params:params]; @@ -21760,7 +17103,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSDictionary *)readAttributeUnoccupiedHeatingSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedHeatingSetpointID) params:params]; @@ -21789,7 +17132,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSDictionary *)readAttributeMinHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinHeatSetpointLimitID) params:params]; @@ -21816,7 +17159,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMaxHeatSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxHeatSetpointLimitID) params:params]; @@ -21843,7 +17186,7 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSDictionary *)readAttributeMinCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinCoolSetpointLimitID) params:params]; @@ -21870,7 +17213,7 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMaxCoolSetpointLimitWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMaxCoolSetpointLimitID) params:params]; @@ -21897,7 +17240,7 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSDictionary *)readAttributeMinSetpointDeadBandWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) params:params]; @@ -21924,7 +17267,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeMinSetpointDeadBandID) value:dataValueDictionary @@ -21934,7 +17277,7 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSDictionary - (NSDictionary *)readAttributeRemoteSensingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) params:params]; @@ -21951,7 +17294,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeRemoteSensingID) value:dataValueDictionary @@ -21961,7 +17304,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeControlSequenceOfOperationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeControlSequenceOfOperationID) params:params]; @@ -21980,7 +17323,7 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSDictionary *)readAttributeSystemModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) params:params]; @@ -22007,7 +17350,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSystemModeID) value:dataValueDictionary @@ -22017,7 +17360,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeThermostatRunningModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningModeID) params:params]; @@ -22025,7 +17368,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeStartOfWeekWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeStartOfWeekID) params:params]; @@ -22033,7 +17376,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfWeeklyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfWeeklyTransitionsID) params:params]; @@ -22041,7 +17384,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeNumberOfDailyTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfDailyTransitionsID) params:params]; @@ -22049,7 +17392,7 @@ - (void)writeAttributeSystemModeWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeTemperatureSetpointHoldWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldID) params:params]; @@ -22068,7 +17411,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSDictionary *)readAttributeTemperatureSetpointHoldDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldDurationID) params:params]; @@ -22097,7 +17440,7 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSDictionary *)readAttributeThermostatProgrammingOperationModeWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) params:params]; @@ -22127,7 +17470,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatProgrammingOperationModeID) value:dataValueDictionary @@ -22137,7 +17480,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeThermostatRunningStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeThermostatRunningStateID) params:params]; @@ -22145,7 +17488,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeSourceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceID) params:params]; @@ -22153,7 +17496,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeAmountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeAmountID) params:params]; @@ -22161,7 +17504,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeSetpointChangeSourceTimestampWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointChangeSourceTimestampID) params:params]; @@ -22169,7 +17512,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSDictionary< - (NSDictionary *)readAttributeOccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) params:params]; @@ -22186,7 +17529,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackID) value:dataValueDictionary @@ -22196,7 +17539,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeOccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMinID) params:params]; @@ -22204,7 +17547,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeOccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeOccupiedSetbackMaxID) params:params]; @@ -22212,7 +17555,7 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeUnoccupiedSetbackWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) params:params]; @@ -22229,7 +17572,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackID) value:dataValueDictionary @@ -22239,7 +17582,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeUnoccupiedSetbackMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMinID) params:params]; @@ -22247,7 +17590,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeUnoccupiedSetbackMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeUnoccupiedSetbackMaxID) params:params]; @@ -22255,7 +17598,7 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSDictionary * - (NSDictionary *)readAttributeEmergencyHeatDeltaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) params:params]; @@ -22272,7 +17615,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEmergencyHeatDeltaID) value:dataValueDictionary @@ -22282,7 +17625,7 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSDictionary - (NSDictionary *)readAttributeACTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) params:params]; @@ -22299,7 +17642,7 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACTypeID) value:dataValueDictionary @@ -22309,7 +17652,7 @@ - (void)writeAttributeACTypeWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeACCapacityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) params:params]; @@ -22326,7 +17669,7 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityID) value:dataValueDictionary @@ -22336,7 +17679,7 @@ - (void)writeAttributeACCapacityWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeACRefrigerantTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) params:params]; @@ -22353,7 +17696,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACRefrigerantTypeID) value:dataValueDictionary @@ -22363,7 +17706,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSDictionary * - (NSDictionary *)readAttributeACCompressorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) params:params]; @@ -22380,7 +17723,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCompressorTypeID) value:dataValueDictionary @@ -22390,7 +17733,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACErrorCodeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) params:params]; @@ -22407,7 +17750,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACErrorCodeID) value:dataValueDictionary @@ -22417,7 +17760,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeACLouverPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) params:params]; @@ -22434,7 +17777,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID) value:dataValueDictionary @@ -22444,7 +17787,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACCoilTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID) params:params]; @@ -22452,7 +17795,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeACCapacityformatWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) params:params]; @@ -22469,7 +17812,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) value:dataValueDictionary @@ -22479,7 +17822,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) params:params]; @@ -22487,7 +17830,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID) params:params]; @@ -22495,7 +17838,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) params:params]; @@ -22503,7 +17846,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAttributeListID) params:params]; @@ -22511,7 +17854,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID) params:params]; @@ -22519,7 +17862,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID) params:params]; @@ -22594,12 +17937,11 @@ @implementation MTRClusterFanControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -22611,62 +17953,25 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeFanControlID, (unsigned int) MTRCommandIDTypeClusterFanControlCommandStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - FanControl::Commands::Step::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.direction - = static_cast>(params.direction.unsignedCharValue); - if (params.wrap != nil) { - auto & definedValue_0 = request.wrap.Emplace(); - definedValue_0 = params.wrap.boolValue; - } - if (params.lowestOff != nil) { - auto & definedValue_0 = request.lowestOff.Emplace(); - definedValue_0 = params.lowestOff.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -22684,7 +17989,7 @@ - (void)stepWithParams:(MTRFanControlClusterStepParams *)params - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) params:params]; @@ -22701,7 +18006,7 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeID) value:dataValueDictionary @@ -22711,7 +18016,7 @@ - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeFanModeSequenceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) params:params]; @@ -22728,7 +18033,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFanModeSequenceID) value:dataValueDictionary @@ -22738,7 +18043,7 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSDictionary *)d - (NSDictionary *)readAttributePercentSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) params:params]; @@ -22755,7 +18060,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentSettingID) value:dataValueDictionary @@ -22765,7 +18070,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributePercentCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributePercentCurrentID) params:params]; @@ -22773,7 +18078,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSpeedMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedMaxID) params:params]; @@ -22781,7 +18086,7 @@ - (void)writeAttributePercentSettingWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeSpeedSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) params:params]; @@ -22798,7 +18103,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedSettingID) value:dataValueDictionary @@ -22808,7 +18113,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeSpeedCurrentID) params:params]; @@ -22816,7 +18121,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeRockSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSupportID) params:params]; @@ -22824,7 +18129,7 @@ - (void)writeAttributeSpeedSettingWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeRockSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) params:params]; @@ -22841,7 +18146,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeRockSettingID) value:dataValueDictionary @@ -22851,7 +18156,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWindSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSupportID) params:params]; @@ -22859,7 +18164,7 @@ - (void)writeAttributeRockSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWindSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) params:params]; @@ -22876,7 +18181,7 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeWindSettingID) value:dataValueDictionary @@ -22886,7 +18191,7 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeAirflowDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) params:params]; @@ -22903,7 +18208,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID) value:dataValueDictionary @@ -22913,7 +18218,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID) params:params]; @@ -22921,7 +18226,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID) params:params]; @@ -22929,7 +18234,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) params:params]; @@ -22937,7 +18242,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAttributeListID) params:params]; @@ -22945,7 +18250,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID) params:params]; @@ -22953,7 +18258,7 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID) params:params]; @@ -22974,12 +18279,11 @@ @implementation MTRClusterThermostatUserInterfaceConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -22988,7 +18292,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID: @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeTemperatureDisplayModeID) @@ -23009,7 +18313,7 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)readAttributeKeypadLockoutWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) params:params]; @@ -23039,7 +18343,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeKeypadLockoutID) value:dataValueDictionary @@ -23050,7 +18354,7 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeScheduleProgrammingVisibilityWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID: @(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID) @@ -23071,7 +18375,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID) params:params]; @@ -23092,7 +18396,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID) params:params]; @@ -23101,7 +18405,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) params:params]; @@ -23110,7 +18414,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) params:params]; @@ -23119,7 +18423,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID) params:params]; @@ -23128,7 +18432,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID) params:params]; @@ -23149,12 +18453,11 @@ @implementation MTRClusterColorControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -23166,58 +18469,25 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23239,57 +18509,25 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23311,58 +18549,25 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23384,56 +18589,25 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23455,57 +18629,25 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23527,58 +18669,25 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23600,57 +18709,25 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToHueAndSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.hue = params.hue.unsignedCharValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23672,57 +18749,25 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorX = params.colorX.unsignedShortValue; - request.colorY = params.colorY.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23744,56 +18789,25 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rateX = params.rateX.shortValue; - request.rateY = params.rateY.shortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23815,57 +18829,25 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColor::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepX = params.stepX.shortValue; - request.stepY = params.stepY.shortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepColorWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23887,56 +18869,25 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveToColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveToColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveToColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -23958,58 +18909,25 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveToHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24031,57 +18949,25 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24103,58 +18989,25 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedStepHueID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedStepHue::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedStepHueWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24176,57 +19029,25 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandEnhancedMoveToHueAndSaturationID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster enhancedMoveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24248,61 +19069,25 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandColorLoopSetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::ColorLoopSet::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.updateFlags - = static_cast>(params.updateFlags.unsignedCharValue); - request.action = static_cast>(params.action.unsignedCharValue); - request.direction - = static_cast>(params.direction.unsignedCharValue); - request.time = params.time.unsignedShortValue; - request.startHue = params.startHue.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster colorLoopSetWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24324,54 +19109,25 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStopMoveStepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StopMoveStep::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopMoveStepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24393,59 +19149,25 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandMoveColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::MoveColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.moveMode - = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster moveColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24467,60 +19189,25 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeColorControlID, + self.endpoint, (unsigned int) MTRClusterIDTypeColorControlID, (unsigned int) MTRCommandIDTypeClusterColorControlCommandStepColorTemperatureID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ColorControl::Commands::StepColorTemperature::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.stepMode - = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.colorTemperatureMinimumMireds = params.colorTemperatureMinimumMireds.unsignedShortValue; - request.colorTemperatureMaximumMireds = params.colorTemperatureMaximumMireds.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stepColorTemperatureWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -24538,7 +19225,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentHueID) params:params]; @@ -24546,7 +19233,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentSaturationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentSaturationID) params:params]; @@ -24554,7 +19241,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeRemainingTimeID) params:params]; @@ -24562,7 +19249,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentXID) params:params]; @@ -24570,7 +19257,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCurrentYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCurrentYID) params:params]; @@ -24578,7 +19265,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeDriftCompensationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeDriftCompensationID) params:params]; @@ -24586,7 +19273,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeCompensationTextWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCompensationTextID) params:params]; @@ -24594,7 +19281,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTemperatureMiredsID) params:params]; @@ -24602,7 +19289,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorModeID) params:params]; @@ -24610,7 +19297,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu - (NSDictionary *)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) params:params]; @@ -24627,7 +19314,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeOptionsID) value:dataValueDictionary @@ -24637,7 +19324,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeNumberOfPrimariesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeNumberOfPrimariesID) params:params]; @@ -24645,7 +19332,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1XID) params:params]; @@ -24653,7 +19340,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1YID) params:params]; @@ -24661,7 +19348,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary1IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary1IntensityID) params:params]; @@ -24669,7 +19356,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2XID) params:params]; @@ -24677,7 +19364,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2YID) params:params]; @@ -24685,7 +19372,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary2IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary2IntensityID) params:params]; @@ -24693,7 +19380,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3XID) params:params]; @@ -24701,7 +19388,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3YID) params:params]; @@ -24709,7 +19396,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary3IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary3IntensityID) params:params]; @@ -24717,7 +19404,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4XID) params:params]; @@ -24725,7 +19412,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4YID) params:params]; @@ -24733,7 +19420,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary4IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary4IntensityID) params:params]; @@ -24741,7 +19428,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5XID) params:params]; @@ -24749,7 +19436,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5YID) params:params]; @@ -24757,7 +19444,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary5IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary5IntensityID) params:params]; @@ -24765,7 +19452,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6XWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6XID) params:params]; @@ -24773,7 +19460,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6YWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6YID) params:params]; @@ -24781,7 +19468,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributePrimary6IntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributePrimary6IntensityID) params:params]; @@ -24789,7 +19476,7 @@ - (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeWhitePointXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) params:params]; @@ -24806,7 +19493,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointXID) value:dataValueDictionary @@ -24816,7 +19503,7 @@ - (void)writeAttributeWhitePointXWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeWhitePointYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) params:params]; @@ -24833,7 +19520,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeWhitePointYID) value:dataValueDictionary @@ -24843,7 +19530,7 @@ - (void)writeAttributeWhitePointYWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeColorPointRXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) params:params]; @@ -24860,7 +19547,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRXID) value:dataValueDictionary @@ -24870,7 +19557,7 @@ - (void)writeAttributeColorPointRXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) params:params]; @@ -24887,7 +19574,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRYID) value:dataValueDictionary @@ -24897,7 +19584,7 @@ - (void)writeAttributeColorPointRYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointRIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointRIntensityID) params:params]; @@ -24914,7 +19601,7 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSDictionary *)readAttributeColorPointGXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) params:params]; @@ -24941,7 +19628,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGXID) value:dataValueDictionary @@ -24951,7 +19638,7 @@ - (void)writeAttributeColorPointGXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) params:params]; @@ -24968,7 +19655,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGYID) value:dataValueDictionary @@ -24978,7 +19665,7 @@ - (void)writeAttributeColorPointGYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointGIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointGIntensityID) params:params]; @@ -24995,7 +19682,7 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSDictionary *)readAttributeColorPointBXWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) params:params]; @@ -25022,7 +19709,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBXID) value:dataValueDictionary @@ -25032,7 +19719,7 @@ - (void)writeAttributeColorPointBXWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBYWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) params:params]; @@ -25049,7 +19736,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBYID) value:dataValueDictionary @@ -25059,7 +19746,7 @@ - (void)writeAttributeColorPointBYWithValue:(NSDictionary *)data - (NSDictionary *)readAttributeColorPointBIntensityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorPointBIntensityID) params:params]; @@ -25076,7 +19763,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeEnhancedCurrentHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedCurrentHueID) params:params]; @@ -25094,7 +19781,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeEnhancedColorModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEnhancedColorModeID) params:params]; @@ -25102,7 +19789,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopActiveWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopActiveID) params:params]; @@ -25110,7 +19797,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopDirectionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopDirectionID) params:params]; @@ -25118,7 +19805,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopTimeID) params:params]; @@ -25126,7 +19813,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopStartEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStartEnhancedHueID) params:params]; @@ -25134,7 +19821,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorLoopStoredEnhancedHueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorLoopStoredEnhancedHueID) params:params]; @@ -25142,7 +19829,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorCapabilitiesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorCapabilitiesID) params:params]; @@ -25150,7 +19837,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorTempPhysicalMinMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMinMiredsID) params:params]; @@ -25158,7 +19845,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeColorTempPhysicalMaxMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeColorTempPhysicalMaxMiredsID) params:params]; @@ -25167,7 +19854,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeCoupleColorTempToLevelMinMiredsID) params:params]; @@ -25175,7 +19862,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSDictionary *)readAttributeStartUpColorTemperatureMiredsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID) params:params]; @@ -25194,7 +19881,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID) params:params]; @@ -25212,7 +19899,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID) params:params]; @@ -25220,7 +19907,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) params:params]; @@ -25228,7 +19915,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) params:params]; @@ -25236,7 +19923,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID) params:params]; @@ -25244,7 +19931,7 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID) params:params]; @@ -25455,12 +20142,11 @@ @implementation MTRClusterBallastConfiguration - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25468,7 +20154,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMinLevelID) params:params]; @@ -25476,7 +20162,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePhysicalMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributePhysicalMaxLevelID) params:params]; @@ -25484,7 +20170,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeBallastStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastStatusID) params:params]; @@ -25492,7 +20178,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) params:params]; @@ -25509,7 +20195,7 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMinLevelID) value:dataValueDictionary @@ -25519,7 +20205,7 @@ - (void)writeAttributeMinLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) params:params]; @@ -25536,7 +20222,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeMaxLevelID) value:dataValueDictionary @@ -25547,7 +20233,7 @@ - (void)writeAttributeMaxLevelWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeIntrinsicBallastFactorWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeIntrinsicBallastFactorID) params:params]; @@ -25566,7 +20252,7 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSDictionary *)readAttributeBallastFactorAdjustmentWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeBallastFactorAdjustmentID) params:params]; @@ -25596,7 +20282,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)readAttributeLampQuantityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampQuantityID) params:params]; @@ -25614,7 +20300,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSDictionary *)readAttributeLampTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) params:params]; @@ -25631,7 +20317,7 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampTypeID) value:dataValueDictionary @@ -25641,7 +20327,7 @@ - (void)writeAttributeLampTypeWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeLampManufacturerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) params:params]; @@ -25658,7 +20344,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampManufacturerID) value:dataValueDictionary @@ -25668,7 +20354,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSDictionary *) - (NSDictionary *)readAttributeLampRatedHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) params:params]; @@ -25685,7 +20371,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampRatedHoursID) value:dataValueDictionary @@ -25695,7 +20381,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeLampBurnHoursWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) params:params]; @@ -25712,7 +20398,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursID) value:dataValueDictionary @@ -25722,7 +20408,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampAlarmModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) params:params]; @@ -25739,7 +20425,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampAlarmModeID) value:dataValueDictionary @@ -25750,7 +20436,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeLampBurnHoursTripPointWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID) params:params]; @@ -25769,7 +20455,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID) params:params]; @@ -25787,7 +20473,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID) params:params]; @@ -25795,7 +20481,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) params:params]; @@ -25803,7 +20489,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) params:params]; @@ -25811,7 +20497,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID) params:params]; @@ -25819,7 +20505,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID) params:params]; @@ -25857,12 +20543,11 @@ @implementation MTRClusterIlluminanceMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25870,7 +20555,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMeasuredValueID) params:params]; @@ -25878,7 +20563,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMinMeasuredValueID) params:params]; @@ -25886,7 +20571,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -25894,7 +20579,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeToleranceID) params:params]; @@ -25902,7 +20587,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLightSensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID) params:params]; @@ -25911,7 +20596,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID) params:params]; @@ -25919,7 +20604,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) params:params]; @@ -25927,7 +20612,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) params:params]; @@ -25935,7 +20620,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) params:params]; @@ -25943,7 +20628,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID) params:params]; @@ -25951,7 +20636,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID) params:params]; @@ -25972,12 +20657,11 @@ @implementation MTRClusterTemperatureMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -25985,7 +20669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMeasuredValueID) params:params]; @@ -25993,7 +20677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26001,7 +20685,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26009,7 +20693,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID) params:params]; @@ -26018,7 +20702,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26026,7 +20710,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26034,7 +20718,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) params:params]; @@ -26042,7 +20726,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) params:params]; @@ -26050,7 +20734,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID) params:params]; @@ -26058,7 +20742,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID) params:params]; @@ -26079,12 +20763,11 @@ @implementation MTRClusterPressureMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26092,7 +20775,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMeasuredValueID) params:params]; @@ -26100,7 +20783,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26108,7 +20791,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26116,7 +20799,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeToleranceID) params:params]; @@ -26124,7 +20807,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledValueID) params:params]; @@ -26132,7 +20815,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMinScaledValueID) params:params]; @@ -26140,7 +20823,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxScaledValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeMaxScaledValueID) params:params]; @@ -26148,7 +20831,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaledToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaledToleranceID) params:params]; @@ -26156,7 +20839,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeScaleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID) params:params]; @@ -26164,7 +20847,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26172,7 +20855,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26180,7 +20863,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) params:params]; @@ -26188,7 +20871,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) params:params]; @@ -26196,7 +20879,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID) params:params]; @@ -26204,7 +20887,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID) params:params]; @@ -26225,12 +20908,11 @@ @implementation MTRClusterFlowMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26238,7 +20920,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMeasuredValueID) params:params]; @@ -26246,7 +20928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26254,7 +20936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26262,7 +20944,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID) params:params]; @@ -26270,7 +20952,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26278,7 +20960,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26286,7 +20968,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) params:params]; @@ -26294,7 +20976,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) params:params]; @@ -26302,7 +20984,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID) params:params]; @@ -26310,7 +20992,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID) params:params]; @@ -26331,12 +21013,11 @@ @implementation MTRClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26344,7 +21025,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMeasuredValueID) params:params]; @@ -26353,7 +21034,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26362,7 +21043,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26370,7 +21051,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeToleranceWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID) params:params]; @@ -26379,7 +21060,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID) params:params]; @@ -26388,7 +21069,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; @@ -26396,7 +21077,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; @@ -26404,7 +21085,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; @@ -26412,7 +21093,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID) params:params]; @@ -26421,7 +21102,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID) params:params]; @@ -26442,12 +21123,11 @@ @implementation MTRClusterOccupancySensing - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26455,7 +21135,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancyID) params:params]; @@ -26463,7 +21143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancySensorTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeID) params:params]; @@ -26471,7 +21151,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeOccupancySensorTypeBitmapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeOccupancySensorTypeBitmapID) params:params]; @@ -26480,7 +21160,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIROccupiedToUnoccupiedDelayID) params:params]; @@ -26499,7 +21179,7 @@ - (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSDictionary *)readAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedDelayID) params:params]; @@ -26529,7 +21209,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSDictionary *)readAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePIRUnoccupiedToOccupiedThresholdID) params:params]; @@ -26560,7 +21240,7 @@ - (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSDictionary *)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) params:params]; @@ -26591,7 +21271,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicOccupiedToUnoccupiedDelayID) value:dataValueDictionary @@ -26602,7 +21282,7 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSDictionary - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) params:params]; @@ -26622,7 +21302,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedDelayID) value:dataValueDictionary @@ -26633,7 +21313,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSDictionary - (NSDictionary *)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) params:params]; @@ -26653,7 +21333,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeUltrasonicUnoccupiedToOccupiedThresholdID) value:dataValueDictionary @@ -26664,7 +21344,7 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSDictio - (NSDictionary *)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) params:params]; @@ -26684,7 +21364,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactOccupiedToUnoccupiedDelayID) value:dataValueDictionary @@ -26695,7 +21375,7 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSDicti - (NSDictionary *)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) params:params]; @@ -26715,7 +21395,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedDelayID) value:dataValueDictionary @@ -26727,7 +21407,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSDicti (MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID: @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) @@ -26748,7 +21428,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID: @(MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID) @@ -26759,7 +21439,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID) params:params]; @@ -26767,7 +21447,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; @@ -26775,7 +21455,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; @@ -26783,7 +21463,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; @@ -26791,7 +21471,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID) params:params]; @@ -26799,7 +21479,7 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID) params:params]; @@ -26872,12 +21552,11 @@ @implementation MTRClusterCarbonMonoxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -26886,7 +21565,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -26895,7 +21574,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -26904,7 +21583,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -26913,7 +21592,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -26922,7 +21601,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -26932,7 +21611,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -26942,7 +21621,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -26952,7 +21631,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -26961,7 +21640,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -26970,7 +21649,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -26979,7 +21658,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -26988,7 +21667,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID) @@ -26998,7 +21677,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27007,7 +21686,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27016,7 +21695,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27025,7 +21704,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27034,7 +21713,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27046,12 +21725,11 @@ @implementation MTRClusterCarbonDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27060,7 +21738,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27069,7 +21747,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27078,7 +21756,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27087,7 +21765,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27096,7 +21774,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27106,7 +21784,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27115,7 +21793,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27125,7 +21803,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27134,7 +21812,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27143,7 +21821,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27152,7 +21830,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27161,7 +21839,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27170,7 +21848,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27179,7 +21857,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27188,7 +21866,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27197,7 +21875,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27206,7 +21884,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27218,12 +21896,11 @@ @implementation MTRClusterNitrogenDioxideConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27232,7 +21909,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27241,7 +21918,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27250,7 +21927,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27259,7 +21936,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27268,7 +21945,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27278,7 +21955,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -27288,7 +21965,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27298,7 +21975,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27307,7 +21984,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27316,7 +21993,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27325,7 +22002,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27334,7 +22011,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID) @@ -27344,7 +22021,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) @@ -27354,7 +22031,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; @@ -27363,7 +22040,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27372,7 +22049,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27381,7 +22058,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27393,12 +22070,11 @@ @implementation MTRClusterOzoneConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27407,7 +22083,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27416,7 +22092,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27425,7 +22101,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27434,7 +22110,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27443,7 +22119,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27452,7 +22128,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27461,7 +22137,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27469,7 +22145,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27478,7 +22154,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27487,7 +22163,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27495,7 +22171,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27504,7 +22180,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27513,7 +22189,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27521,7 +22197,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; @@ -27530,7 +22206,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27538,7 +22214,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27547,7 +22223,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27559,12 +22235,11 @@ @implementation MTRClusterPM25ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27572,7 +22247,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27581,7 +22256,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27590,7 +22265,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27599,7 +22274,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27608,7 +22283,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27617,7 +22292,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27626,7 +22301,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27634,7 +22309,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27643,7 +22318,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27652,7 +22327,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27660,7 +22335,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27669,7 +22344,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27678,7 +22353,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27686,7 +22361,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; @@ -27694,7 +22369,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27702,7 +22377,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27711,7 +22386,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27723,12 +22398,11 @@ @implementation MTRClusterFormaldehydeConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27737,7 +22411,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27746,7 +22420,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27755,7 +22429,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27764,7 +22438,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27773,7 +22447,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -27783,7 +22457,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27792,7 +22466,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -27802,7 +22476,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27811,7 +22485,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27820,7 +22494,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27829,7 +22503,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -27838,7 +22512,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -27847,7 +22521,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -27856,7 +22530,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; @@ -27865,7 +22539,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -27874,7 +22548,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -27883,7 +22557,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -27895,12 +22569,11 @@ @implementation MTRClusterPM1ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -27908,7 +22581,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -27917,7 +22590,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -27926,7 +22599,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -27935,7 +22608,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -27944,7 +22617,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -27953,7 +22626,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -27962,7 +22635,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -27970,7 +22643,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -27979,7 +22652,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -27988,7 +22661,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -27996,7 +22669,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28005,7 +22678,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28014,7 +22687,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28022,7 +22695,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; @@ -28030,7 +22703,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28038,7 +22711,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28047,7 +22720,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28059,12 +22732,11 @@ @implementation MTRClusterPM10ConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28072,7 +22744,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -28081,7 +22753,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -28090,7 +22762,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -28099,7 +22771,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -28108,7 +22780,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -28117,7 +22789,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -28126,7 +22798,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -28134,7 +22806,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -28143,7 +22815,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -28152,7 +22824,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -28160,7 +22832,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28169,7 +22841,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28178,7 +22850,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28186,7 +22858,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; @@ -28194,7 +22866,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28202,7 +22874,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28211,7 +22883,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28223,12 +22895,11 @@ @implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28237,7 +22908,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasuredValueID) @@ -28247,7 +22918,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMinMeasuredValueID) @@ -28257,7 +22928,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMaxMeasuredValueID) @@ -28267,7 +22938,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueID) @@ -28277,7 +22948,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributePeakMeasuredValueWindowID) @@ -28287,7 +22958,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueID) @@ -28297,7 +22968,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAverageMeasuredValueWindowID) @@ -28307,7 +22978,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeUncertaintyID) @@ -28317,7 +22988,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementUnitID) @@ -28327,7 +22998,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeMeasurementMediumID) @@ -28337,7 +23008,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID) @@ -28347,7 +23018,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID) @@ -28357,7 +23028,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) @@ -28367,7 +23038,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) @@ -28377,7 +23048,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) @@ -28387,7 +23058,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID) @@ -28397,7 +23068,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID: @(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID) @@ -28410,12 +23081,11 @@ @implementation MTRClusterRadonConcentrationMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28424,7 +23094,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasuredValueID) params:params]; @@ -28433,7 +23103,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMinMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMinMeasuredValueID) params:params]; @@ -28442,7 +23112,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMaxMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMaxMeasuredValueID) params:params]; @@ -28451,7 +23121,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueID) params:params]; @@ -28460,7 +23130,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributePeakMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributePeakMeasuredValueWindowID) params:params]; @@ -28469,7 +23139,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueID) params:params]; @@ -28478,7 +23148,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAverageMeasuredValueWindowWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAverageMeasuredValueWindowID) params:params]; @@ -28486,7 +23156,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeUncertaintyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeUncertaintyID) params:params]; @@ -28495,7 +23165,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementUnitWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementUnitID) params:params]; @@ -28504,7 +23174,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMeasurementMediumWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeMeasurementMediumID) params:params]; @@ -28512,7 +23182,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeLevelValueWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID) params:params]; @@ -28521,7 +23191,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID) params:params]; @@ -28530,7 +23200,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; @@ -28538,7 +23208,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; @@ -28547,7 +23217,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -28555,7 +23225,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID) params:params]; @@ -28564,7 +23234,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID) params:params]; @@ -28576,12 +23246,11 @@ @implementation MTRClusterWakeOnLAN - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28589,7 +23258,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeMACAddressID) params:params]; @@ -28597,7 +23266,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID) params:params]; @@ -28605,7 +23274,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; @@ -28613,7 +23282,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; @@ -28621,7 +23290,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; @@ -28629,7 +23298,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID) params:params]; @@ -28637,7 +23306,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID) params:params]; @@ -28660,12 +23329,11 @@ @implementation MTRClusterChannel - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -28678,54 +23346,26 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRChannelClusterChangeChannelResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ChannelClusterChangeChannelResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::ChangeChannel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.match = [self asCharSpan:params.match]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + changeChannelWithParams:params + completion:^(MTRChannelClusterChangeChannelResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28747,54 +23387,25 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeChannelID, + self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandChangeChannelByNumberID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::ChangeChannelByNumber::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.majorNumber = params.majorNumber.unsignedShortValue; - request.minorNumber = params.minorNumber.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster changeChannelByNumberWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28816,53 +23427,25 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeChannelID, (unsigned int) MTRCommandIDTypeClusterChannelCommandSkipChannelID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - Channel::Commands::SkipChannel::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.count = params.count.shortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster skipChannelWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -28880,7 +23463,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeChannelListID) params:params]; @@ -28888,7 +23471,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeLineupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeLineupID) params:params]; @@ -28896,7 +23479,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeCurrentChannelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID) params:params]; @@ -28904,7 +23487,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID) params:params]; @@ -28912,7 +23495,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; @@ -28920,7 +23503,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; @@ -28928,7 +23511,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; @@ -28936,7 +23519,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeFeatureMapID) params:params]; @@ -28944,7 +23527,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID) params:params]; @@ -28999,12 +23582,11 @@ @implementation MTRClusterTargetNavigator - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -29017,58 +23599,26 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeTargetNavigatorID, + self.endpoint, (unsigned int) MTRClusterIDTypeTargetNavigatorID, (unsigned int) MTRCommandIDTypeClusterTargetNavigatorCommandNavigateTargetID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - TargetNavigatorClusterNavigateTargetResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - TargetNavigator::Commands::NavigateTarget::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.target = params.target.unsignedCharValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29086,7 +23636,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeTargetListID) params:params]; @@ -29094,7 +23644,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeCurrentTargetWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID) params:params]; @@ -29102,7 +23652,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID) params:params]; @@ -29110,7 +23660,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; @@ -29118,7 +23668,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; @@ -29126,7 +23676,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; @@ -29134,7 +23684,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID) params:params]; @@ -29142,7 +23692,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID) params:params]; @@ -29178,12 +23728,11 @@ @implementation MTRClusterMediaPlayback - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -29203,53 +23752,25 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPlayID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Play::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster playWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29279,53 +23800,25 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPauseID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Pause::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster pauseWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29355,53 +23848,25 @@ - (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStopID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Stop::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster stopWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29434,53 +23899,25 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandStartOverID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::StartOver::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster startOverWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29510,53 +23947,25 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandPreviousID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Previous::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster previousWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29586,53 +23995,25 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandNextID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Next::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster nextWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29662,53 +24043,25 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandRewindID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Rewind::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster rewindWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29741,53 +24094,26 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandFastForwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::FastForward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + fastForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29810,54 +24136,26 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipForwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::SkipForward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + skipForwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29880,54 +24178,26 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSkipBackwardID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::SkipBackward::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + skipBackwardWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -29950,54 +24220,25 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeMediaPlaybackID, (unsigned int) MTRCommandIDTypeClusterMediaPlaybackCommandSeekID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - MediaPlaybackClusterPlaybackResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaPlayback::Commands::Seek::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.position = params.position.unsignedLongLongValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster seekWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30015,7 +24256,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeCurrentStateID) params:params]; @@ -30023,7 +24264,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeStartTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeStartTimeID) params:params]; @@ -30031,7 +24272,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeDurationID) params:params]; @@ -30039,7 +24280,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSampledPositionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSampledPositionID) params:params]; @@ -30047,7 +24288,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributePlaybackSpeedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributePlaybackSpeedID) params:params]; @@ -30055,7 +24296,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSeekRangeEndWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeEndID) params:params]; @@ -30063,7 +24304,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeSeekRangeStartWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeSeekRangeStartID) params:params]; @@ -30071,7 +24312,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID) params:params]; @@ -30079,7 +24320,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; @@ -30087,7 +24328,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; @@ -30095,7 +24336,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; @@ -30103,7 +24344,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID) params:params]; @@ -30111,7 +24352,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID) params:params]; @@ -30366,12 +24607,11 @@ @implementation MTRClusterMediaInput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30383,53 +24623,25 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandSelectInputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::SelectInput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selectInputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30460,52 +24672,25 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandShowInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::ShowInputStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster showInputStatusWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30536,52 +24721,25 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandHideInputStatusID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::HideInputStatus::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster hideInputStatusWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30603,54 +24761,25 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, + self.endpoint, (unsigned int) MTRClusterIDTypeMediaInputID, (unsigned int) MTRCommandIDTypeClusterMediaInputCommandRenameInputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - MediaInput::Commands::RenameInput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster renameInputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30668,7 +24797,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeInputListID) params:params]; @@ -30676,7 +24805,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeCurrentInputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID) params:params]; @@ -30684,7 +24813,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID) params:params]; @@ -30692,7 +24821,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; @@ -30700,7 +24829,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; @@ -30708,7 +24837,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; @@ -30716,7 +24845,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID) params:params]; @@ -30724,7 +24853,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID) params:params]; @@ -30803,12 +24932,11 @@ @implementation MTRClusterLowPower - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30826,52 +24954,25 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeLowPowerID, (unsigned int) MTRCommandIDTypeClusterLowPowerCommandSleepID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - LowPower::Commands::Sleep::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster sleepWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -30889,7 +24990,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID) params:params]; @@ -30897,7 +24998,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; @@ -30905,7 +25006,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; @@ -30913,7 +25014,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; @@ -30921,7 +25022,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID) params:params]; @@ -30929,7 +25030,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID) params:params]; @@ -30969,12 +25070,11 @@ @implementation MTRClusterKeypadInput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -30987,54 +25087,25 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeKeypadInputID, (unsigned int) MTRCommandIDTypeClusterKeypadInputCommandSendKeyID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRKeypadInputClusterSendKeyResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - KeypadInputClusterSendKeyResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - KeypadInput::Commands::SendKey::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31052,7 +25123,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID) params:params]; @@ -31060,7 +25131,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; @@ -31068,7 +25139,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; @@ -31076,7 +25147,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; @@ -31084,7 +25155,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID) params:params]; @@ -31092,7 +25163,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID) params:params]; @@ -31127,12 +25198,11 @@ @implementation MTRClusterContentLauncher - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31145,112 +25215,26 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchContentID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRContentLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ContentLauncher::Commands::LaunchContent::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.search.parameterList.count != 0) { - auto * listHolder_1 = new ListHolder(params.search.parameterList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.search.parameterList.count; ++i_1) { - if (![params.search.parameterList[i_1] - isKindOfClass:[MTRContentLauncherClusterParameterStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRContentLauncherClusterParameterStruct *) params.search.parameterList[i_1]; - listHolder_1->mList[i_1].type - = static_castmList[i_1].type)>>( - element_1.type.unsignedCharValue); - listHolder_1->mList[i_1].value = [self asCharSpan:element_1.value]; - if (element_1.externalIDList != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_1.externalIDList.count != 0) { - auto * listHolder_4 = new ListHolder(element_1.externalIDList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_1.externalIDList.count; ++i_4) { - if (![element_1.externalIDList[i_4] - isKindOfClass:[MTRContentLauncherClusterAdditionalInfoStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 - = (MTRContentLauncherClusterAdditionalInfoStruct *) element_1.externalIDList[i_4]; - listHolder_4->mList[i_4].name = [self asCharSpan:element_4.name]; - listHolder_4->mList[i_4].value = [self asCharSpan:element_4.value]; - } - definedValue_3 = ListType_4(listHolder_4->mList, element_1.externalIDList.count); - } else { - definedValue_3 = ListType_4(); - } - } - } - } - request.search.parameterList = ListType_1(listHolder_1->mList, params.search.parameterList.count); - } else { - request.search.parameterList = ListType_1(); - } - } - request.autoPlay = params.autoPlay.boolValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster launchContentWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31273,152 +25257,26 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeContentLauncherID, (unsigned int) MTRCommandIDTypeClusterContentLauncherCommandLaunchURLID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRContentLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ContentLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ContentLauncher::Commands::LaunchURL::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.contentURL = [self asCharSpan:params.contentURL]; - if (params.displayString != nil) { - auto & definedValue_0 = request.displayString.Emplace(); - definedValue_0 = [self asCharSpan:params.displayString]; - } - if (params.brandingInformation != nil) { - auto & definedValue_0 = request.brandingInformation.Emplace(); - definedValue_0.providerName = [self asCharSpan:params.brandingInformation.providerName]; - if (params.brandingInformation.background != nil) { - auto & definedValue_2 = definedValue_0.background.Emplace(); - if (params.brandingInformation.background.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.imageURL]; - } - if (params.brandingInformation.background.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.color]; - } - if (params.brandingInformation.background.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.background.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.background.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.background.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.logo != nil) { - auto & definedValue_2 = definedValue_0.logo.Emplace(); - if (params.brandingInformation.logo.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.imageURL]; - } - if (params.brandingInformation.logo.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.color]; - } - if (params.brandingInformation.logo.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.logo.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.logo.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.logo.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.progressBar != nil) { - auto & definedValue_2 = definedValue_0.progressBar.Emplace(); - if (params.brandingInformation.progressBar.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.imageURL]; - } - if (params.brandingInformation.progressBar.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.color]; - } - if (params.brandingInformation.progressBar.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.progressBar.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.progressBar.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.progressBar.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.splash != nil) { - auto & definedValue_2 = definedValue_0.splash.Emplace(); - if (params.brandingInformation.splash.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.imageURL]; - } - if (params.brandingInformation.splash.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.color]; - } - if (params.brandingInformation.splash.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.splash.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.splash.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.splash.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.waterMark != nil) { - auto & definedValue_2 = definedValue_0.waterMark.Emplace(); - if (params.brandingInformation.waterMark.imageURL != nil) { - auto & definedValue_4 = definedValue_2.imageURL.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.imageURL]; - } - if (params.brandingInformation.waterMark.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.color]; - } - if (params.brandingInformation.waterMark.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.waterMark.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.waterMark.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.waterMark.size.metric.unsignedCharValue); - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + launchURLWithParams:params + completion:^(MTRContentLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31436,7 +25294,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - (NSDictionary *)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptHeaderID) params:params]; @@ -31445,7 +25303,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - (NSDictionary *)readAttributeSupportedStreamingProtocolsWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID) params:params]; @@ -31464,7 +25322,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID) params:params]; @@ -31482,7 +25340,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID) params:params]; @@ -31490,7 +25348,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; @@ -31498,7 +25356,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; @@ -31506,7 +25364,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID) params:params]; @@ -31514,7 +25372,7 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID) params:params]; @@ -31563,12 +25421,11 @@ @implementation MTRClusterAudioOutput - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31580,53 +25437,25 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, + self.endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandSelectOutputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AudioOutput::Commands::SelectOutput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster selectOutputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31648,54 +25477,25 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, + self.endpoint, (unsigned int) MTRClusterIDTypeAudioOutputID, (unsigned int) MTRCommandIDTypeClusterAudioOutputCommandRenameOutputID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AudioOutput::Commands::RenameOutput::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster renameOutputWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31713,7 +25513,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeOutputListID) params:params]; @@ -31721,7 +25521,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeCurrentOutputWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID) params:params]; @@ -31729,7 +25529,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID) params:params]; @@ -31737,7 +25537,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; @@ -31745,7 +25545,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; @@ -31753,7 +25553,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; @@ -31761,7 +25561,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID) params:params]; @@ -31769,7 +25569,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID) params:params]; @@ -31810,12 +25610,11 @@ @implementation MTRClusterApplicationLauncher - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -31828,64 +25627,26 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nul NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandLaunchAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::LaunchApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asByteSpan:params.data]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster launchAppWithParams:params + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31908,60 +25669,26 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullabl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandStopAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::StopApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + stopAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -31984,60 +25711,26 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, + self.endpoint, (unsigned int) MTRClusterIDTypeApplicationLauncherID, (unsigned int) MTRCommandIDTypeClusterApplicationLauncherCommandHideAppID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - ApplicationLauncherClusterLauncherResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ApplicationLauncher::Commands::HideApp::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.application != nil) { - auto & definedValue_0 = request.application.Emplace(); - definedValue_0.catalogVendorID = params.application.catalogVendorID.unsignedShortValue; - definedValue_0.applicationID = [self asCharSpan:params.application.applicationID]; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + hideAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32055,7 +25748,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (NSDictionary *)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCatalogListID) params:params]; @@ -32063,7 +25756,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullabl - (NSDictionary *)readAttributeCurrentAppWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) params:params]; @@ -32080,7 +25773,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID) value:dataValueDictionary @@ -32090,7 +25783,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID) params:params]; @@ -32098,7 +25791,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; @@ -32106,7 +25799,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; @@ -32114,7 +25807,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; @@ -32122,7 +25815,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID) params:params]; @@ -32130,7 +25823,7 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID) params:params]; @@ -32193,12 +25886,11 @@ @implementation MTRClusterApplicationBasic - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32206,7 +25898,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorNameID) params:params]; @@ -32214,7 +25906,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeVendorIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeVendorIDID) params:params]; @@ -32222,7 +25914,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationNameWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationNameID) params:params]; @@ -32230,7 +25922,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeProductIDWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeProductIDID) params:params]; @@ -32238,7 +25930,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationID) params:params]; @@ -32246,7 +25938,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeStatusID) params:params]; @@ -32254,7 +25946,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeApplicationVersionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeApplicationVersionID) params:params]; @@ -32262,7 +25954,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAllowedVendorListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID) params:params]; @@ -32270,7 +25962,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID) params:params]; @@ -32278,7 +25970,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; @@ -32286,7 +25978,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; @@ -32294,7 +25986,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; @@ -32302,7 +25994,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID) params:params]; @@ -32310,7 +26002,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID) params:params]; @@ -32331,12 +26023,11 @@ @implementation MTRClusterAccountLogin - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32349,57 +26040,26 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, + self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandGetSetupPINID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - AccountLoginClusterGetSetupPINResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::GetSetupPIN::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + getSetupPINWithParams:params + completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32421,57 +26081,25 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLoginID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::Login::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - request.setupPIN = [self asCharSpan:params.setupPIN]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster loginWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32499,55 +26127,25 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeAccountLoginID, (unsigned int) MTRCommandIDTypeClusterAccountLoginCommandLogoutID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AccountLogin::Commands::Logout::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster logoutWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32565,7 +26163,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID) params:params]; @@ -32573,7 +26171,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; @@ -32581,7 +26179,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; @@ -32589,7 +26187,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; @@ -32597,7 +26195,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID) params:params]; @@ -32605,7 +26203,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID) params:params]; @@ -32669,12 +26267,11 @@ @implementation MTRClusterElectricalMeasurement - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -32695,52 +26292,25 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, + self.endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ElectricalMeasurement::Commands::GetProfileInfoCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getProfileInfoCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32762,56 +26332,26 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeElectricalMeasurementID, (unsigned int) MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.attributeId = params.attributeId.unsignedShortValue; - request.startTime = params.startTime.unsignedIntValue; - request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster getMeasurementProfileCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -32829,7 +26369,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; @@ -32837,7 +26377,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) params:params]; @@ -32845,7 +26385,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; @@ -32853,7 +26393,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; @@ -32861,7 +26401,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) params:params]; @@ -32869,7 +26409,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; @@ -32877,7 +26417,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; @@ -32885,7 +26425,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) params:params]; @@ -32893,7 +26433,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; @@ -32901,7 +26441,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; @@ -32909,7 +26449,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; @@ -32917,7 +26457,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; @@ -32925,7 +26465,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; @@ -32933,7 +26473,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; @@ -32941,7 +26481,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; @@ -32949,7 +26489,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; @@ -32957,7 +26497,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; @@ -32965,7 +26505,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; @@ -32973,7 +26513,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; @@ -32981,7 +26521,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; @@ -32989,7 +26529,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; @@ -32997,7 +26537,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; @@ -33005,7 +26545,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; @@ -33014,7 +26554,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) params:params]; @@ -33023,7 +26563,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) params:params]; @@ -33032,7 +26572,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) params:params]; @@ -33041,7 +26581,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) params:params]; @@ -33050,7 +26590,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) params:params]; @@ -33059,7 +26599,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) params:params]; @@ -33068,7 +26608,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) params:params]; @@ -33077,7 +26617,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) params:params]; @@ -33086,7 +26626,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) params:params]; @@ -33095,7 +26635,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) params:params]; @@ -33104,7 +26644,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) params:params]; @@ -33113,7 +26653,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) params:params]; @@ -33122,7 +26662,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) params:params]; @@ -33130,7 +26670,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; @@ -33138,7 +26678,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; @@ -33146,7 +26686,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) params:params]; @@ -33155,7 +26695,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) params:params]; @@ -33164,7 +26704,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) params:params]; @@ -33172,7 +26712,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; @@ -33181,7 +26721,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) params:params]; @@ -33190,7 +26730,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) params:params]; @@ -33199,7 +26739,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) params:params]; @@ -33207,7 +26747,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; @@ -33215,7 +26755,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; @@ -33223,7 +26763,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; @@ -33231,7 +26771,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; @@ -33239,7 +26779,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; @@ -33247,7 +26787,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; @@ -33255,7 +26795,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; @@ -33263,7 +26803,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) params:params]; @@ -33271,7 +26811,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; @@ -33279,7 +26819,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; @@ -33287,7 +26827,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) params:params]; @@ -33295,7 +26835,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) params:params]; @@ -33303,7 +26843,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) params:params]; @@ -33312,7 +26852,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG - (NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) params:params]; @@ -33332,7 +26872,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< NSNumber * timedWriteTimeout = params.timedWriteTimeout; [self.device - writeAttributeWithEndpointID:@(_endpoint) + writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) value:dataValueDictionary @@ -33343,7 +26883,7 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary< - (NSDictionary *)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) params:params]; @@ -33363,7 +26903,7 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) params:params]; @@ -33394,7 +26934,7 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) params:params]; @@ -33425,7 +26965,7 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; @@ -33452,7 +26992,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary @@ -33463,7 +27003,7 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary - (NSDictionary *)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) params:params]; @@ -33482,7 +27022,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; @@ -33500,7 +27040,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; @@ -33508,7 +27048,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; @@ -33516,7 +27056,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; @@ -33524,7 +27064,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; @@ -33532,7 +27072,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; @@ -33540,7 +27080,7 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; @@ -33557,7 +27097,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary @@ -33567,7 +27107,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; @@ -33575,7 +27115,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; @@ -33583,7 +27123,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary - (NSDictionary *)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; @@ -33600,7 +27140,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; @@ -33618,7 +27158,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; @@ -33627,7 +27167,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) params:params]; @@ -33636,7 +27176,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) params:params]; @@ -33645,7 +27185,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) params:params]; @@ -33654,7 +27194,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) params:params]; @@ -33663,7 +27203,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) params:params]; @@ -33672,7 +27212,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) params:params]; @@ -33680,7 +27220,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; @@ -33688,7 +27228,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; @@ -33696,7 +27236,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; @@ -33704,7 +27244,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; @@ -33713,7 +27253,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) params:params]; @@ -33721,7 +27261,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; @@ -33729,7 +27269,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; @@ -33737,7 +27277,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; @@ -33745,7 +27285,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; @@ -33753,7 +27293,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; @@ -33761,7 +27301,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; @@ -33769,7 +27309,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; @@ -33777,7 +27317,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; @@ -33785,7 +27325,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; @@ -33793,7 +27333,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; @@ -33801,7 +27341,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; @@ -33809,7 +27349,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; @@ -33818,7 +27358,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID: @(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID) @@ -33828,7 +27368,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) params:params]; @@ -33837,7 +27377,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) params:params]; @@ -33846,7 +27386,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) params:params]; @@ -33855,7 +27395,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) params:params]; @@ -33864,7 +27404,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) params:params]; @@ -33873,7 +27413,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) params:params]; @@ -33881,7 +27421,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; @@ -33889,7 +27429,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; @@ -33898,7 +27438,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) params:params]; @@ -33906,7 +27446,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; @@ -33914,7 +27454,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; @@ -33922,7 +27462,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; @@ -33930,7 +27470,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; @@ -33938,7 +27478,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; @@ -33946,7 +27486,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; @@ -33954,7 +27494,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; @@ -33962,7 +27502,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; @@ -33970,7 +27510,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; @@ -33978,7 +27518,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; @@ -33986,7 +27526,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; @@ -33994,7 +27534,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; @@ -34003,7 +27543,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID: @(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID) @@ -34013,7 +27553,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) params:params]; @@ -34022,7 +27562,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) params:params]; @@ -34031,7 +27571,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) params:params]; @@ -34040,7 +27580,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) params:params]; @@ -34049,7 +27589,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) params:params]; @@ -34058,7 +27598,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params { return [self.device - readAttributeWithEndpointID:@(_endpoint) + readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) params:params]; @@ -34066,7 +27606,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; @@ -34074,7 +27614,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; @@ -34082,7 +27622,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) params:params]; @@ -34090,7 +27630,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) params:params]; @@ -34098,7 +27638,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) params:params]; @@ -34106,7 +27646,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; @@ -34156,12 +27696,11 @@ @implementation MTRClusterUnitTesting - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - if (self = [super initWithQueue:queue]) { + if (self = [super initWithEndpointID:endpointID queue:queue]) { if (device == nil) { return nil; } - _endpoint = [endpointID unsignedShortValue]; _device = device; } return self; @@ -34179,52 +27718,25 @@ - (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::Test::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34255,52 +27767,25 @@ - (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _N completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNotHandledID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNotHandled::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNotHandledWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34333,53 +27818,26 @@ - (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nulla NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSpecificID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestSpecificResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestSpecificResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSpecific::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testSpecificWithParams:params + completion:^(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34410,52 +27868,25 @@ - (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestUnknownCommandID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestUnknownCommand::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testUnknownCommandWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34478,55 +27909,26 @@ - (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestAddArgumentsID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestAddArgumentsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestAddArgumentsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestAddArguments::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = params.arg2.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testAddArgumentsWithParams:params + completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34549,54 +27951,26 @@ - (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgu NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestSimpleArgumentResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestSimpleArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSimpleArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testSimpleArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34620,265 +27994,27 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStruc NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArrayArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestStructArrayArgumentResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestStructArrayArgumentResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestStructArrayArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; - listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; - listHolder_0->mList[i_0].c.c - = static_castmList[i_0].c.c)>>( - element_0.c.c.unsignedCharValue); - listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; - listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; - listHolder_0->mList[i_0].c.f - = static_castmList[i_0].c.f)>>( - element_0.c.f.unsignedCharValue); - listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; - listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].d)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.d.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.d.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { - if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2]; - listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; - listHolder_2->mList[i_2].b = element_2.b.boolValue; - listHolder_2->mList[i_2].c - = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); - listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; - listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; - listHolder_2->mList[i_2].f - = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); - listHolder_2->mList[i_2].g = element_2.g.floatValue; - listHolder_2->mList[i_2].h = element_2.h.doubleValue; - } - listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); - } else { - listHolder_0->mList[i_0].d = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].e)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.e.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.e.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { - if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.e[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedIntValue; - } - listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); - } else { - listHolder_0->mList[i_0].e = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].f)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.f.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.f.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { - if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.f[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); - } else { - listHolder_0->mList[i_0].f = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].g)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.g.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.g.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { - if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.g[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); - } else { - listHolder_0->mList[i_0].g = ListType_2(); - } - } - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg2.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg2.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg2.count; ++i_0) { - if (![params.arg2[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg2[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c = static_castmList[i_0].c)>>( - element_0.c.unsignedCharValue); - listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( - element_0.f.unsignedCharValue); - listHolder_0->mList[i_0].g = element_0.g.floatValue; - listHolder_0->mList[i_0].h = element_0.h.doubleValue; - } - request.arg2 = ListType_0(listHolder_0->mList, params.arg2.count); - } else { - request.arg2 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg3.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg3.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg3.count; ++i_0) { - if (![params.arg3[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg3[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - element_0.unsignedCharValue); - } - request.arg3 = ListType_0(listHolder_0->mList, params.arg3.count); - } else { - request.arg3 = ListType_0(); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg4.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg4.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg4.count; ++i_0) { - if (![params.arg4[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg4[i_0]; - listHolder_0->mList[i_0] = element_0.boolValue; - } - request.arg4 = ListType_0(listHolder_0->mList, params.arg4.count); - } else { - request.arg4 = ListType_0(); - } - } - request.arg5 = static_cast>(params.arg5.unsignedCharValue); - request.arg6 = params.arg6.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testStructArrayArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34901,61 +28037,26 @@ - (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgu NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -34978,65 +28079,26 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNest NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNestedStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c - = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f - = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNestedStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35059,84 +28121,26 @@ - (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListSt NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListStructArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListStructArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterSimpleStruct *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c = static_castmList[i_0].c)>>( - element_0.c.unsignedCharValue); - listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( - element_0.f.unsignedCharValue); - listHolder_0->mList[i_0].g = element_0.g.floatValue; - listHolder_0->mList[i_0].h = element_0.h.doubleValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListStructArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35159,75 +28163,26 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListInt8UArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListInt8UArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35250,162 +28205,26 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTest NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNestedStructListArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c - = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f - = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.d.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.d.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) { - if (![params.arg1.d[i_1] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRUnitTestingClusterSimpleStruct *) params.arg1.d[i_1]; - listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue; - listHolder_1->mList[i_1].b = element_1.b.boolValue; - listHolder_1->mList[i_1].c = static_castmList[i_1].c)>>( - element_1.c.unsignedCharValue); - listHolder_1->mList[i_1].d = [self asByteSpan:element_1.d]; - listHolder_1->mList[i_1].e = [self asCharSpan:element_1.e]; - listHolder_1->mList[i_1].f = static_castmList[i_1].f)>>( - element_1.f.unsignedCharValue); - listHolder_1->mList[i_1].g = element_1.g.floatValue; - listHolder_1->mList[i_1].h = element_1.h.doubleValue; - } - request.arg1.d = ListType_1(listHolder_1->mList, params.arg1.d.count); - } else { - request.arg1.d = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.e.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.e.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.e.count; ++i_1) { - if (![params.arg1.e[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.arg1.e[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedIntValue; - } - request.arg1.e = ListType_1(listHolder_1->mList, params.arg1.e.count); - } else { - request.arg1.e = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.f.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.f.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.f.count; ++i_1) { - if (![params.arg1.f[i_1] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSData *) params.arg1.f[i_1]; - listHolder_1->mList[i_1] = [self asByteSpan:element_1]; - } - request.arg1.f = ListType_1(listHolder_1->mList, params.arg1.f.count); - } else { - request.arg1.f = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.g.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.g.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.g.count; ++i_1) { - if (![params.arg1.g[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.arg1.g[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedCharValue; - } - request.arg1.g = ListType_1(listHolder_1->mList, params.arg1.g.count); - } else { - request.arg1.g = ListType_1(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35429,188 +28248,27 @@ - (void)testListNestedStructListArgumentRequestWithParams: NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListNestedStructListArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterBooleanResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterBooleanResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListNestedStructListArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[MTRUnitTestingClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUnitTestingClusterNestedStructList *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; - listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; - listHolder_0->mList[i_0].c.c - = static_castmList[i_0].c.c)>>( - element_0.c.c.unsignedCharValue); - listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; - listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; - listHolder_0->mList[i_0].c.f - = static_castmList[i_0].c.f)>>( - element_0.c.f.unsignedCharValue); - listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; - listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].d)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.d.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.d.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { - if (![element_0.d[i_2] isKindOfClass:[MTRUnitTestingClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRUnitTestingClusterSimpleStruct *) element_0.d[i_2]; - listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; - listHolder_2->mList[i_2].b = element_2.b.boolValue; - listHolder_2->mList[i_2].c - = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); - listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; - listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; - listHolder_2->mList[i_2].f - = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); - listHolder_2->mList[i_2].g = element_2.g.floatValue; - listHolder_2->mList[i_2].h = element_2.h.doubleValue; - } - listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); - } else { - listHolder_0->mList[i_0].d = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].e)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.e.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.e.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { - if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.e[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedIntValue; - } - listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); - } else { - listHolder_0->mList[i_0].e = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].f)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.f.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.f.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { - if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.f[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); - } else { - listHolder_0->mList[i_0].f = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].g)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.g.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.g.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { - if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.g[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); - } else { - listHolder_0->mList[i_0].g = ListType_2(); - } - } - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35633,75 +28291,26 @@ - (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8 NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestListInt8UReverseRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestListInt8UReverseResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestListInt8UReverseResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestListInt8UReverseRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testListInt8UReverseRequestWithParams:params + completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35724,55 +28333,26 @@ - (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEnumsRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEnumsResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEnumsResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEnumsRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = static_cast>(params.arg1.unsignedShortValue); - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEnumsRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEnumsResponseParams * _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35795,64 +28375,26 @@ - (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullable NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestNullableOptionalResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestNullableOptionalRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - if (params.arg1 == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.arg1.unsignedCharValue; - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testNullableOptionalRequestWithParams:params + completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -35877,223 +28419,28 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestC NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestComplexNullableOptionalRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestComplexNullableOptionalResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestComplexNullableOptionalResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestComplexNullableOptionalRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params.nullableInt == nil) { - request.nullableInt.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableInt.SetNonNull(); - nonNullValue_0 = params.nullableInt.unsignedShortValue; - } - if (params.optionalInt != nil) { - auto & definedValue_0 = request.optionalInt.Emplace(); - definedValue_0 = params.optionalInt.unsignedShortValue; - } - if (params.nullableOptionalInt != nil) { - auto & definedValue_0 = request.nullableOptionalInt.Emplace(); - if (params.nullableOptionalInt == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.nullableOptionalInt.unsignedShortValue; - } - } - if (params.nullableString == nil) { - request.nullableString.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableString.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.nullableString]; - } - if (params.optionalString != nil) { - auto & definedValue_0 = request.optionalString.Emplace(); - definedValue_0 = [self asCharSpan:params.optionalString]; - } - if (params.nullableOptionalString != nil) { - auto & definedValue_0 = request.nullableOptionalString.Emplace(); - if (params.nullableOptionalString == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = [self asCharSpan:params.nullableOptionalString]; - } - } - if (params.nullableStruct == nil) { - request.nullableStruct.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableStruct.SetNonNull(); - nonNullValue_0.a = params.nullableStruct.a.unsignedCharValue; - nonNullValue_0.b = params.nullableStruct.b.boolValue; - nonNullValue_0.c = static_cast>( - params.nullableStruct.c.unsignedCharValue); - nonNullValue_0.d = [self asByteSpan:params.nullableStruct.d]; - nonNullValue_0.e = [self asCharSpan:params.nullableStruct.e]; - nonNullValue_0.f = static_cast>( - params.nullableStruct.f.unsignedCharValue); - nonNullValue_0.g = params.nullableStruct.g.floatValue; - nonNullValue_0.h = params.nullableStruct.h.doubleValue; - } - if (params.optionalStruct != nil) { - auto & definedValue_0 = request.optionalStruct.Emplace(); - definedValue_0.a = params.optionalStruct.a.unsignedCharValue; - definedValue_0.b = params.optionalStruct.b.boolValue; - definedValue_0.c = static_cast>( - params.optionalStruct.c.unsignedCharValue); - definedValue_0.d = [self asByteSpan:params.optionalStruct.d]; - definedValue_0.e = [self asCharSpan:params.optionalStruct.e]; - definedValue_0.f = static_cast>( - params.optionalStruct.f.unsignedCharValue); - definedValue_0.g = params.optionalStruct.g.floatValue; - definedValue_0.h = params.optionalStruct.h.doubleValue; - } - if (params.nullableOptionalStruct != nil) { - auto & definedValue_0 = request.nullableOptionalStruct.Emplace(); - if (params.nullableOptionalStruct == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1.a = params.nullableOptionalStruct.a.unsignedCharValue; - nonNullValue_1.b = params.nullableOptionalStruct.b.boolValue; - nonNullValue_1.c = static_cast>( - params.nullableOptionalStruct.c.unsignedCharValue); - nonNullValue_1.d = [self asByteSpan:params.nullableOptionalStruct.d]; - nonNullValue_1.e = [self asCharSpan:params.nullableOptionalStruct.e]; - nonNullValue_1.f = static_cast>( - params.nullableOptionalStruct.f.unsignedCharValue); - nonNullValue_1.g = params.nullableOptionalStruct.g.floatValue; - nonNullValue_1.h = params.nullableOptionalStruct.h.doubleValue; - } - } - if (params.nullableList == nil) { - request.nullableList.SetNull(); - } else { - auto & nonNullValue_0 = request.nullableList.SetNonNull(); - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.nullableList.count != 0) { - auto * listHolder_1 = new ListHolder(params.nullableList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.nullableList.count; ++i_1) { - if (![params.nullableList[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.nullableList[i_1]; - listHolder_1->mList[i_1] = static_castmList[i_1])>>( - element_1.unsignedCharValue); - } - nonNullValue_0 = ListType_1(listHolder_1->mList, params.nullableList.count); - } else { - nonNullValue_0 = ListType_1(); - } - } - } - if (params.optionalList != nil) { - auto & definedValue_0 = request.optionalList.Emplace(); - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.optionalList.count != 0) { - auto * listHolder_1 = new ListHolder(params.optionalList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.optionalList.count; ++i_1) { - if (![params.optionalList[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (NSNumber *) params.optionalList[i_1]; - listHolder_1->mList[i_1] = static_castmList[i_1])>>( - element_1.unsignedCharValue); - } - definedValue_0 = ListType_1(listHolder_1->mList, params.optionalList.count); - } else { - definedValue_0 = ListType_1(); - } - } - } - if (params.nullableOptionalList != nil) { - auto & definedValue_0 = request.nullableOptionalList.Emplace(); - if (params.nullableOptionalList == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - { - using ListType_2 = std::remove_reference_t; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (params.nullableOptionalList.count != 0) { - auto * listHolder_2 = new ListHolder(params.nullableOptionalList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < params.nullableOptionalList.count; ++i_2) { - if (![params.nullableOptionalList[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) params.nullableOptionalList[i_2]; - listHolder_2->mList[i_2] - = static_castmList[i_2])>>( - element_2.unsignedCharValue); - } - nonNullValue_1 = ListType_2(listHolder_2->mList, params.nullableOptionalList.count); - } else { - nonNullValue_1 = ListType_2(); - } - } - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testComplexNullableOptionalRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36116,61 +28463,26 @@ - (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEcho NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandSimpleStructEchoRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterSimpleStructResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterSimpleStructResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::SimpleStructEchoRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster simpleStructEchoRequestWithParams:params + completion:^(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36201,55 +28513,25 @@ - (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestPar completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTimedInvokeRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TimedInvokeRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster timedInvokeRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36271,58 +28553,25 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSi completion:(MTRStatusCompletion)completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestSimpleOptionalArgumentRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestSimpleOptionalArgumentRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - definedValue_0 = params.arg1.boolValue; - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testSimpleOptionalArgumentRequestWithParams:params + completion:^(NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, nil, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36345,56 +28594,26 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve NSError * _Nullable error))completion { NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, - _endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, + self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEmitTestEventResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEmitTestEventResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEmitTestEventRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - request.arg3 = params.arg3.boolValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster testEmitTestEventRequestWithParams:params + completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36420,56 +28639,29 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve NSError * _Nullable error))completion { NSString * logPrefix = - [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, _endpoint, + [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, self.endpoint, (unsigned int) MTRClusterIDTypeUnitTestingID, (unsigned int) MTRCommandIDTypeClusterUnitTestingCommandTestEmitTestFabricScopedEventRequestID]; // Make a copy of params before we go async. params = [params copy]; - NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMsParam) { - timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); - } MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); - MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID - controller:self.device.deviceController]; - auto * bridge = new MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge( - self.device.queue, - ^(id _Nullable value, NSError * _Nullable error) { - MTRClustersLogCompletion(logPrefix, value, error); - dispatch_async(self.callbackQueue, ^{ - completion(value, error); - }); - [workItem endWork]; - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge - = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - UnitTesting::Commands::TestEmitTestFabricScopedEventRequest::Type request; - if (timedInvokeTimeoutMsParam != nil) { - timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); - } - if (params != nil) { - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout - = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.arg1 = params.arg1.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, - self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(baseDevice); + auto * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; + auto * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:baseDevice + endpointID:@(self.endpoint) + queue:self.device.queue]; + [cluster + testEmitTestFabricScopedEventRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable value, + NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(value, error); + }); + [workItem endWork]; + }]; }; workItem.readyHandler = readyHandler; MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); @@ -36487,7 +28679,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEve - (NSDictionary *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) params:params]; @@ -36504,7 +28696,7 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID) value:dataValueDictionary @@ -36514,7 +28706,7 @@ - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) params:params]; @@ -36531,7 +28723,7 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID) value:dataValueDictionary @@ -36541,7 +28733,7 @@ - (void)writeAttributeBitmap8WithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) params:params]; @@ -36558,7 +28750,7 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID) value:dataValueDictionary @@ -36568,7 +28760,7 @@ - (void)writeAttributeBitmap16WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) params:params]; @@ -36585,7 +28777,7 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID) value:dataValueDictionary @@ -36595,7 +28787,7 @@ - (void)writeAttributeBitmap32WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) params:params]; @@ -36612,7 +28804,7 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID) value:dataValueDictionary @@ -36622,7 +28814,7 @@ - (void)writeAttributeBitmap64WithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) params:params]; @@ -36639,7 +28831,7 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID) value:dataValueDictionary @@ -36649,7 +28841,7 @@ - (void)writeAttributeInt8uWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) params:params]; @@ -36666,7 +28858,7 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID) value:dataValueDictionary @@ -36676,7 +28868,7 @@ - (void)writeAttributeInt16uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) params:params]; @@ -36693,7 +28885,7 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID) value:dataValueDictionary @@ -36703,7 +28895,7 @@ - (void)writeAttributeInt24uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) params:params]; @@ -36720,7 +28912,7 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID) value:dataValueDictionary @@ -36730,7 +28922,7 @@ - (void)writeAttributeInt32uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) params:params]; @@ -36747,7 +28939,7 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID) value:dataValueDictionary @@ -36757,7 +28949,7 @@ - (void)writeAttributeInt40uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) params:params]; @@ -36774,7 +28966,7 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID) value:dataValueDictionary @@ -36784,7 +28976,7 @@ - (void)writeAttributeInt48uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) params:params]; @@ -36801,7 +28993,7 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID) value:dataValueDictionary @@ -36811,7 +29003,7 @@ - (void)writeAttributeInt56uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) params:params]; @@ -36828,7 +29020,7 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID) value:dataValueDictionary @@ -36838,7 +29030,7 @@ - (void)writeAttributeInt64uWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) params:params]; @@ -36855,7 +29047,7 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID) value:dataValueDictionary @@ -36865,7 +29057,7 @@ - (void)writeAttributeInt8sWithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) params:params]; @@ -36882,7 +29074,7 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID) value:dataValueDictionary @@ -36892,7 +29084,7 @@ - (void)writeAttributeInt16sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) params:params]; @@ -36909,7 +29101,7 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID) value:dataValueDictionary @@ -36919,7 +29111,7 @@ - (void)writeAttributeInt24sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) params:params]; @@ -36936,7 +29128,7 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID) value:dataValueDictionary @@ -36946,7 +29138,7 @@ - (void)writeAttributeInt32sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) params:params]; @@ -36963,7 +29155,7 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID) value:dataValueDictionary @@ -36973,7 +29165,7 @@ - (void)writeAttributeInt40sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) params:params]; @@ -36990,7 +29182,7 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID) value:dataValueDictionary @@ -37000,7 +29192,7 @@ - (void)writeAttributeInt48sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) params:params]; @@ -37017,7 +29209,7 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID) value:dataValueDictionary @@ -37027,7 +29219,7 @@ - (void)writeAttributeInt56sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) params:params]; @@ -37044,7 +29236,7 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID) value:dataValueDictionary @@ -37054,7 +29246,7 @@ - (void)writeAttributeInt64sWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) params:params]; @@ -37071,7 +29263,7 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID) value:dataValueDictionary @@ -37081,7 +29273,7 @@ - (void)writeAttributeEnum8WithValue:(NSDictionary *)dataValueDi - (NSDictionary *)readAttributeEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) params:params]; @@ -37098,7 +29290,7 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID) value:dataValueDictionary @@ -37108,7 +29300,7 @@ - (void)writeAttributeEnum16WithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) params:params]; @@ -37125,7 +29317,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID) value:dataValueDictionary @@ -37135,7 +29327,7 @@ - (void)writeAttributeFloatSingleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) params:params]; @@ -37152,7 +29344,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID) value:dataValueDictionary @@ -37162,7 +29354,7 @@ - (void)writeAttributeFloatDoubleWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) params:params]; @@ -37179,7 +29371,7 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID) value:dataValueDictionary @@ -37189,7 +29381,7 @@ - (void)writeAttributeOctetStringWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeListInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) params:params]; @@ -37206,7 +29398,7 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID) value:dataValueDictionary @@ -37216,7 +29408,7 @@ - (void)writeAttributeListInt8uWithValue:(NSDictionary *)dataVal - (NSDictionary *)readAttributeListOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) params:params]; @@ -37233,7 +29425,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID) value:dataValueDictionary @@ -37243,7 +29435,7 @@ - (void)writeAttributeListOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeListStructOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListStructOctetStringID) params:params]; @@ -37262,7 +29454,7 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSDictionary *)readAttributeLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) params:params]; @@ -37289,7 +29481,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID) value:dataValueDictionary @@ -37299,7 +29491,7 @@ - (void)writeAttributeLongOctetStringWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) params:params]; @@ -37316,7 +29508,7 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID) value:dataValueDictionary @@ -37326,7 +29518,7 @@ - (void)writeAttributeCharStringWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeLongCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) params:params]; @@ -37343,7 +29535,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID) value:dataValueDictionary @@ -37353,7 +29545,7 @@ - (void)writeAttributeLongCharStringWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEpochUsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) params:params]; @@ -37370,7 +29562,7 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID) value:dataValueDictionary @@ -37380,7 +29572,7 @@ - (void)writeAttributeEpochUsWithValue:(NSDictionary *)dataValue - (NSDictionary *)readAttributeEpochSWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) params:params]; @@ -37397,7 +29589,7 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID) value:dataValueDictionary @@ -37407,7 +29599,7 @@ - (void)writeAttributeEpochSWithValue:(NSDictionary *)dataValueD - (NSDictionary *)readAttributeVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) params:params]; @@ -37424,7 +29616,7 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID) value:dataValueDictionary @@ -37435,7 +29627,7 @@ - (void)writeAttributeVendorIdWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeListNullablesAndOptionalsStructWithParams:(MTRReadParams * _Nullable)params { return - [self.device readAttributeWithEndpointID:@(_endpoint) + [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListNullablesAndOptionalsStructID) params:params]; @@ -37454,7 +29646,7 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSDictionary *)readAttributeEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) params:params]; @@ -37481,7 +29673,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID) value:dataValueDictionary @@ -37491,7 +29683,7 @@ - (void)writeAttributeEnumAttrWithValue:(NSDictionary *)dataValu - (NSDictionary *)readAttributeStructAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) params:params]; @@ -37508,7 +29700,7 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID) value:dataValueDictionary @@ -37518,7 +29710,7 @@ - (void)writeAttributeStructAttrWithValue:(NSDictionary *)dataVa - (NSDictionary *)readAttributeRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8uID) params:params]; @@ -37535,7 +29727,7 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8sID) params:params]; @@ -37562,7 +29754,7 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16uID) params:params]; @@ -37591,7 +29783,7 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16sID) params:params]; @@ -37620,7 +29812,7 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeListLongOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) params:params]; @@ -37647,7 +29839,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID) value:dataValueDictionary @@ -37657,7 +29849,7 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) params:params]; @@ -37674,7 +29866,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID) value:dataValueDictionary @@ -37684,7 +29876,7 @@ - (void)writeAttributeListFabricScopedWithValue:(NSDictionary *) - (NSDictionary *)readAttributeTimedWriteBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) params:params]; @@ -37701,7 +29893,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID) value:dataValueDictionary @@ -37711,7 +29903,7 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSDictionary * - (NSDictionary *)readAttributeGeneralErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) params:params]; @@ -37728,7 +29920,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID) value:dataValueDictionary @@ -37738,7 +29930,7 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeClusterErrorBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) params:params]; @@ -37755,7 +29947,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID) value:dataValueDictionary @@ -37765,7 +29957,7 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSDictionary - (NSDictionary *)readAttributeUnsupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) params:params]; @@ -37782,7 +29974,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) value:dataValueDictionary @@ -37792,7 +29984,7 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV - (NSDictionary *)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) params:params]; @@ -37809,7 +30001,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) value:dataValueDictionary @@ -37819,7 +30011,7 @@ - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) params:params]; @@ -37836,7 +30028,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID) value:dataValueDictionary @@ -37846,7 +30038,7 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSDictionary *)d - (NSDictionary *)readAttributeNullableBitmap16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) params:params]; @@ -37863,7 +30055,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID) value:dataValueDictionary @@ -37873,7 +30065,7 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap32WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) params:params]; @@ -37890,7 +30082,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID) value:dataValueDictionary @@ -37900,7 +30092,7 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableBitmap64WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) params:params]; @@ -37917,7 +30109,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID) value:dataValueDictionary @@ -37927,7 +30119,7 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) params:params]; @@ -37944,7 +30136,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID) value:dataValueDictionary @@ -37954,7 +30146,7 @@ - (void)writeAttributeNullableInt8uWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) params:params]; @@ -37971,7 +30163,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID) value:dataValueDictionary @@ -37981,7 +30173,7 @@ - (void)writeAttributeNullableInt16uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) params:params]; @@ -37998,7 +30190,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID) value:dataValueDictionary @@ -38008,7 +30200,7 @@ - (void)writeAttributeNullableInt24uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) params:params]; @@ -38025,7 +30217,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID) value:dataValueDictionary @@ -38035,7 +30227,7 @@ - (void)writeAttributeNullableInt32uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) params:params]; @@ -38052,7 +30244,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID) value:dataValueDictionary @@ -38062,7 +30254,7 @@ - (void)writeAttributeNullableInt40uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) params:params]; @@ -38079,7 +30271,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID) value:dataValueDictionary @@ -38089,7 +30281,7 @@ - (void)writeAttributeNullableInt48uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) params:params]; @@ -38106,7 +30298,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID) value:dataValueDictionary @@ -38116,7 +30308,7 @@ - (void)writeAttributeNullableInt56uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) params:params]; @@ -38133,7 +30325,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID) value:dataValueDictionary @@ -38143,7 +30335,7 @@ - (void)writeAttributeNullableInt64uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) params:params]; @@ -38160,7 +30352,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID) value:dataValueDictionary @@ -38170,7 +30362,7 @@ - (void)writeAttributeNullableInt8sWithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) params:params]; @@ -38187,7 +30379,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID) value:dataValueDictionary @@ -38197,7 +30389,7 @@ - (void)writeAttributeNullableInt16sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt24sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) params:params]; @@ -38214,7 +30406,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID) value:dataValueDictionary @@ -38224,7 +30416,7 @@ - (void)writeAttributeNullableInt24sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt32sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) params:params]; @@ -38241,7 +30433,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID) value:dataValueDictionary @@ -38251,7 +30443,7 @@ - (void)writeAttributeNullableInt32sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt40sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) params:params]; @@ -38268,7 +30460,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID) value:dataValueDictionary @@ -38278,7 +30470,7 @@ - (void)writeAttributeNullableInt40sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt48sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) params:params]; @@ -38295,7 +30487,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID) value:dataValueDictionary @@ -38305,7 +30497,7 @@ - (void)writeAttributeNullableInt48sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt56sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) params:params]; @@ -38322,7 +30514,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID) value:dataValueDictionary @@ -38332,7 +30524,7 @@ - (void)writeAttributeNullableInt56sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableInt64sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) params:params]; @@ -38349,7 +30541,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID) value:dataValueDictionary @@ -38359,7 +30551,7 @@ - (void)writeAttributeNullableInt64sWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableEnum8WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) params:params]; @@ -38376,7 +30568,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID) value:dataValueDictionary @@ -38386,7 +30578,7 @@ - (void)writeAttributeNullableEnum8WithValue:(NSDictionary *)dat - (NSDictionary *)readAttributeNullableEnum16WithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) params:params]; @@ -38403,7 +30595,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID) value:dataValueDictionary @@ -38413,7 +30605,7 @@ - (void)writeAttributeNullableEnum16WithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableFloatSingleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) params:params]; @@ -38430,7 +30622,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID) value:dataValueDictionary @@ -38440,7 +30632,7 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableFloatDoubleWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) params:params]; @@ -38457,7 +30649,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID) value:dataValueDictionary @@ -38467,7 +30659,7 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableOctetStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) params:params]; @@ -38484,7 +30676,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID) value:dataValueDictionary @@ -38494,7 +30686,7 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableCharStringWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) params:params]; @@ -38511,7 +30703,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID) value:dataValueDictionary @@ -38521,7 +30713,7 @@ - (void)writeAttributeNullableCharStringWithValue:(NSDictionary - (NSDictionary *)readAttributeNullableEnumAttrWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) params:params]; @@ -38538,7 +30730,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID) value:dataValueDictionary @@ -38548,7 +30740,7 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSDictionary *) - (NSDictionary *)readAttributeNullableStructWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) params:params]; @@ -38565,7 +30757,7 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID) value:dataValueDictionary @@ -38575,7 +30767,7 @@ - (void)writeAttributeNullableStructWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeNullableRangeRestrictedInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8uID) params:params]; @@ -38594,7 +30786,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt8sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8sID) params:params]; @@ -38623,7 +30815,7 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16uID) params:params]; @@ -38652,7 +30844,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSDictionary *)readAttributeNullableRangeRestrictedInt16sWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16sID) params:params]; @@ -38681,7 +30873,7 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSDictionary *)readAttributeWriteOnlyInt8uWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) params:params]; @@ -38708,7 +30900,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(_endpoint) + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID) value:dataValueDictionary @@ -38718,7 +30910,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID) params:params]; @@ -38726,7 +30918,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID) params:params]; @@ -38734,7 +30926,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) params:params]; @@ -38742,7 +30934,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID) params:params]; @@ -38750,7 +30942,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID) params:params]; @@ -38758,7 +30950,7 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da - (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(_endpoint) + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index d26b14c35e3001..db2545a83c9ade 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -22,466 +22,373 @@ #import "MTRDevice_Internal.h" @interface MTRClusterIdentify () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGroups () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterScenes () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOnOff () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOnOffSwitchConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLevelControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBinaryInputBasic () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPulseWidthModulation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDescriptor () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBinding () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAccessControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterActions () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBasicInformation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOTASoftwareUpdateProvider () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOTASoftwareUpdateRequestor () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLocalizationConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTimeFormatLocalization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUnitLocalization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPowerSourceConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPowerSource () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGeneralCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterNetworkCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDiagnosticLogs () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGeneralDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSoftwareDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThreadNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWiFiNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterEthernetNetworkDiagnostics () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTimeSynchronization () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBridgedDeviceBasicInformation () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSwitch () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAdministratorCommissioning () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOperationalCredentials () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterGroupKeyManagement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFixedLabel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUserLabel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBooleanState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterICDManagement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterModeSelect () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLaundryWasherMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRefrigeratorAndTemperatureControlledCabinetMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLaundryWasherControls () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCRunMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCCleanMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTemperatureControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRefrigeratorAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDishwasherMode () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAirQuality () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterSmokeCOAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDishwasherAlarm () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOperationalState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRVCOperationalState () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterHEPAFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterActivatedCarbonFilterMonitoring () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterDoorLock () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWindowCovering () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBarrierControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPumpConfigurationAndControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThermostat () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFanControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterThermostatUserInterfaceConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterColorControl () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterBallastConfiguration () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterIlluminanceMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTemperatureMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPressureMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFlowMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRelativeHumidityMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOccupancySensing () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterCarbonMonoxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterCarbonDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterNitrogenDioxideConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterOzoneConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM25ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterFormaldehydeConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM1ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterPM10ConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterRadonConcentrationMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterWakeOnLAN () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterChannel () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterTargetNavigator () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterMediaPlayback () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterMediaInput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterLowPower () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterKeypadInput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterContentLauncher () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAudioOutput () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterApplicationLauncher () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterApplicationBasic () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterAccountLogin () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterElectricalMeasurement () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end @interface MTRClusterUnitTesting () -@property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end